diff options
author | Nishanth Aravamudan <nacc@us.ibm.com> | 2005-09-10 09:27:21 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-10 19:06:36 +0200 |
commit | 64ed93a268bc18fa6f72f61420d0e0022c5e38d1 (patch) | |
tree | 1332ce542510b88014767f3536d9150710a2f3f9 /kernel | |
parent | [PATCH] i386/x86_64: make get_cpu_vendor() static (diff) | |
download | linux-64ed93a268bc18fa6f72f61420d0e0022c5e38d1.tar.xz linux-64ed93a268bc18fa6f72f61420d0e0022c5e38d1.zip |
[PATCH] add schedule_timeout_{,un}interruptible() interfaces
Add schedule_timeout_{,un}interruptible() interfaces so that
schedule_timeout() callers don't have to worry about forgetting to add the
set_current_state() call beforehand.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/timer.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/kernel/timer.c b/kernel/timer.c index 13e2b513be01..a0b716d62701 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) { |