Skip to content

Commit

Permalink
Add schedule_timeout_killable
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
  • Loading branch information
Matthew Wilcox authored and Matthew Wilcox committed Dec 6, 2007
1 parent da78451 commit 294d5cc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/linux/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
7 changes: 7 additions & 0 deletions kernel/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 294d5cc

Please sign in to comment.