Skip to content

Commit

Permalink
[PATCH] schedule_timeout_[un]interruptible() speedup
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Sep 13, 2005
1 parent 498d0c5 commit 8a1c175
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions kernel/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8a1c175

Please sign in to comment.