aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2005-09-13 04:25:15 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-13 11:22:29 -0400
commit8a1c17574a01555e5d3fdf56d8d72969904c91ca (patch)
tree9855d1048c2547ac9292c5e4c09c2a88f3b3e4fb
parent498d0c5711094b0e1fd93f5355d270ccebdec706 (diff)
[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>
-rw-r--r--kernel/timer.c9
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)
1151 out: 1151 out:
1152 return timeout < 0 ? 0 : timeout; 1152 return timeout < 0 ? 0 : timeout;
1153} 1153}
1154
1155EXPORT_SYMBOL(schedule_timeout); 1154EXPORT_SYMBOL(schedule_timeout);
1156 1155
1156/*
1157 * We can use __set_current_state() here because schedule_timeout() calls
1158 * schedule() unconditionally.
1159 */
1157signed long __sched schedule_timeout_interruptible(signed long timeout) 1160signed long __sched schedule_timeout_interruptible(signed long timeout)
1158{ 1161{
1159 set_current_state(TASK_INTERRUPTIBLE); 1162 __set_current_state(TASK_INTERRUPTIBLE);
1160 return schedule_timeout(timeout); 1163 return schedule_timeout(timeout);
1161} 1164}
1162EXPORT_SYMBOL(schedule_timeout_interruptible); 1165EXPORT_SYMBOL(schedule_timeout_interruptible);
1163 1166
1164signed long __sched schedule_timeout_uninterruptible(signed long timeout) 1167signed long __sched schedule_timeout_uninterruptible(signed long timeout)
1165{ 1168{
1166 set_current_state(TASK_UNINTERRUPTIBLE); 1169 __set_current_state(TASK_UNINTERRUPTIBLE);
1167 return schedule_timeout(timeout); 1170 return schedule_timeout(timeout);
1168} 1171}
1169EXPORT_SYMBOL(schedule_timeout_uninterruptible); 1172EXPORT_SYMBOL(schedule_timeout_uninterruptible);