diff --git a/include/linux/sched.h b/include/linux/sched.h index ac70f845b5b1d03d80c115bde4da3291485dfaad..4b83cb230006afe05271c0143c2b86dbb40c0ebc 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -203,6 +203,8 @@ extern int in_sched_functions(unsigned long addr); #define MAX_SCHEDULE_TIMEOUT LONG_MAX extern signed long FASTCALL(schedule_timeout(signed long timeout)); +extern signed long schedule_timeout_interruptible(signed long timeout); +extern signed long schedule_timeout_uninterruptible(signed long timeout); asmlinkage void schedule(void); struct namespace; diff --git a/kernel/timer.c b/kernel/timer.c index 13e2b513be019bf0b8b6b9218e4f268fff95f58a..a0b716d62701d99db4bbfa1fc621f68cff53f6ca 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@ -1154,6 +1154,20 @@ fastcall signed long __sched schedule_timeout(signed long timeout) EXPORT_SYMBOL(schedule_timeout); +signed long __sched schedule_timeout_interruptible(signed long timeout) +{ + set_current_state(TASK_INTERRUPTIBLE); + return schedule_timeout(timeout); +} +EXPORT_SYMBOL(schedule_timeout_interruptible); + +signed long __sched schedule_timeout_uninterruptible(signed long timeout) +{ + set_current_state(TASK_UNINTERRUPTIBLE); + return schedule_timeout(timeout); +} +EXPORT_SYMBOL(schedule_timeout_uninterruptible); + /* Thread ID - the internal kernel "pid" */ asmlinkage long sys_gettid(void) {