aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2014-04-07 11:33:06 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-07 14:24:06 -0400
commitb8780c363d808a726a34793caa900923d32b6b80 (patch)
tree06e8fe284ccbad76fb2fca0d9e982e5de49bf245 /kernel
parent240cd6a817bd855e3f1e615ed9ae16407f8cfce6 (diff)
sched: remove sleep_on() and friends
This is the final piece in the puzzle, as all patches to remove the last users of \(interruptible_\|\)sleep_on\(_timeout\|\) have made it into the 3.15 merge window. The work was long overdue, and this interface in particular should not have survived the BKL removal that was done a couple of years ago. Citing Jon Corbet from http://lwn.net/2001/0201/kernel.php3": "[...] it was suggested that the janitors look for and fix all code that calls sleep_on() [...] since (1) almost all such code is incorrect, and (2) Linus has agreed that those functions should be removed in the 2.5 development series". We haven't quite made it for 2.5, but maybe we can merge this for 3.15. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ingo Molnar <mingo@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched/core.c46
1 files changed, 0 insertions, 46 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 1d1b87b36778..0ff3f34bc7e3 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -2845,52 +2845,6 @@ int default_wake_function(wait_queue_t *curr, unsigned mode, int wake_flags,
2845} 2845}
2846EXPORT_SYMBOL(default_wake_function); 2846EXPORT_SYMBOL(default_wake_function);
2847 2847
2848static long __sched
2849sleep_on_common(wait_queue_head_t *q, int state, long timeout)
2850{
2851 unsigned long flags;
2852 wait_queue_t wait;
2853
2854 init_waitqueue_entry(&wait, current);
2855
2856 __set_current_state(state);
2857
2858 spin_lock_irqsave(&q->lock, flags);
2859 __add_wait_queue(q, &wait);
2860 spin_unlock(&q->lock);
2861 timeout = schedule_timeout(timeout);
2862 spin_lock_irq(&q->lock);
2863 __remove_wait_queue(q, &wait);
2864 spin_unlock_irqrestore(&q->lock, flags);
2865
2866 return timeout;
2867}
2868
2869void __sched interruptible_sleep_on(wait_queue_head_t *q)
2870{
2871 sleep_on_common(q, TASK_INTERRUPTIBLE, MAX_SCHEDULE_TIMEOUT);
2872}
2873EXPORT_SYMBOL(interruptible_sleep_on);
2874
2875long __sched
2876interruptible_sleep_on_timeout(wait_queue_head_t *q, long timeout)
2877{
2878 return sleep_on_common(q, TASK_INTERRUPTIBLE, timeout);
2879}
2880EXPORT_SYMBOL(interruptible_sleep_on_timeout);
2881
2882void __sched sleep_on(wait_queue_head_t *q)
2883{
2884 sleep_on_common(q, TASK_UNINTERRUPTIBLE, MAX_SCHEDULE_TIMEOUT);
2885}
2886EXPORT_SYMBOL(sleep_on);
2887
2888long __sched sleep_on_timeout(wait_queue_head_t *q, long timeout)
2889{
2890 return sleep_on_common(q, TASK_UNINTERRUPTIBLE, timeout);
2891}
2892EXPORT_SYMBOL(sleep_on_timeout);
2893
2894#ifdef CONFIG_RT_MUTEXES 2848#ifdef CONFIG_RT_MUTEXES
2895 2849
2896/* 2850/*