mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 14:11:20 +00:00
[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>
This commit is contained in:
parent
498d0c5711
commit
8a1c17574a
1 changed files with 6 additions and 3 deletions
|
@ -1151,19 +1151,22 @@ fastcall signed long __sched schedule_timeout(signed long timeout)
|
||||||
out:
|
out:
|
||||||
return timeout < 0 ? 0 : timeout;
|
return timeout < 0 ? 0 : timeout;
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_SYMBOL(schedule_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)
|
signed long __sched schedule_timeout_interruptible(signed long timeout)
|
||||||
{
|
{
|
||||||
set_current_state(TASK_INTERRUPTIBLE);
|
__set_current_state(TASK_INTERRUPTIBLE);
|
||||||
return schedule_timeout(timeout);
|
return schedule_timeout(timeout);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(schedule_timeout_interruptible);
|
EXPORT_SYMBOL(schedule_timeout_interruptible);
|
||||||
|
|
||||||
signed long __sched schedule_timeout_uninterruptible(signed long timeout)
|
signed long __sched schedule_timeout_uninterruptible(signed long timeout)
|
||||||
{
|
{
|
||||||
set_current_state(TASK_UNINTERRUPTIBLE);
|
__set_current_state(TASK_UNINTERRUPTIBLE);
|
||||||
return schedule_timeout(timeout);
|
return schedule_timeout(timeout);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(schedule_timeout_uninterruptible);
|
EXPORT_SYMBOL(schedule_timeout_uninterruptible);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue