From: Matthew Wilcox Date: Thu, 6 Dec 2007 16:59:46 +0000 (-0500) Subject: Add schedule_timeout_killable X-Git-Tag: v2.6.25-rc1~1125^2~4 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=294d5cc233d81ec4aec77ebc60dc5752a3d0082a;p=linux-2.6-omap-h63xx.git Add schedule_timeout_killable Signed-off-by: Matthew Wilcox --- diff --git a/include/linux/sched.h b/include/linux/sched.h index 95395c143ba..e4921aad406 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -314,6 +314,7 @@ 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_killable(signed long timeout); extern signed long schedule_timeout_uninterruptible(signed long timeout); asmlinkage void schedule(void); diff --git a/kernel/timer.c b/kernel/timer.c index a05817c021d..66d7d8bca1a 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@ -1100,6 +1100,13 @@ signed long __sched schedule_timeout_interruptible(signed long timeout) } EXPORT_SYMBOL(schedule_timeout_interruptible); +signed long __sched schedule_timeout_killable(signed long timeout) +{ + __set_current_state(TASK_KILLABLE); + return schedule_timeout(timeout); +} +EXPORT_SYMBOL(schedule_timeout_killable); + signed long __sched schedule_timeout_uninterruptible(signed long timeout) { __set_current_state(TASK_UNINTERRUPTIBLE);