![Ingo Molnar](/assets/img/avatar_default.png)
Fix up affected files that include this signal functionality via sched.h. Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
18 lines
369 B
C
18 lines
369 B
C
#include <linux/tty.h>
|
|
#include <linux/sched/signal.h>
|
|
#include "dgnc_utils.h"
|
|
|
|
/*
|
|
* dgnc_ms_sleep()
|
|
*
|
|
* Put the driver to sleep for x ms's
|
|
*
|
|
* Returns 0 if timed out, !0 (showing signal) if interrupted by a signal.
|
|
*/
|
|
int dgnc_ms_sleep(ulong ms)
|
|
{
|
|
__set_current_state(TASK_INTERRUPTIBLE);
|
|
schedule_timeout((ms * HZ) / 1000);
|
|
return signal_pending(current);
|
|
}
|