diff options
author | Andrew Morton <akpm@osdl.org> | 2005-09-13 01:25:15 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-13 08:22:29 -0700 |
commit | 8a1c17574a01555e5d3fdf56d8d72969904c91ca (patch) | |
tree | 9855d1048c2547ac9292c5e4c09c2a88f3b3e4fb /kernel | |
parent | 498d0c5711094b0e1fd93f5355d270ccebdec706 (diff) | |
download | linux-8a1c17574a01555e5d3fdf56d8d72969904c91ca.tar.gz linux-8a1c17574a01555e5d3fdf56d8d72969904c91ca.tar.bz2 linux-8a1c17574a01555e5d3fdf56d8d72969904c91ca.zip |
[PATCH] schedule_timeout_[un]interruptible() speedup
These functions don't need schedule_timeout()'s barrier.
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 | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/kernel/timer.c b/kernel/timer.c index f4152fcd9f8e..3ba10fa35b60 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@ -1151,19 +1151,22 @@ fastcall signed long __sched schedule_timeout(signed long timeout) out: return timeout < 0 ? 0 : timeout; } - EXPORT_SYMBOL(schedule_timeout); +/* + * We can use __set_current_state() here because schedule_timeout() calls + * schedule() unconditionally. + */ signed long __sched schedule_timeout_interruptible(signed long timeout) { - set_current_state(TASK_INTERRUPTIBLE); + __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); + __set_current_state(TASK_UNINTERRUPTIBLE); return schedule_timeout(timeout); } EXPORT_SYMBOL(schedule_timeout_uninterruptible); |