aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2009-12-17 21:29:31 -0500
committerAndrea Bastoni <bastoni@cs.unc.edu>2009-12-17 21:29:31 -0500
commit4db5b318390ff38488ef1f066e6cacc8f7479064 (patch)
treea7cb2ee0fde6af89ef27aee2795c3b161e6946bd /kernel/sched.c
parent10f45252adb78753aa50d25b148fc608e3b4c224 (diff)
Add complete_n() call
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index fcaed6b96442..328a67c55287 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -5809,6 +5809,17 @@ void complete_all(struct completion *x)
5809} 5809}
5810EXPORT_SYMBOL(complete_all); 5810EXPORT_SYMBOL(complete_all);
5811 5811
5812void complete_n(struct completion *x, int n)
5813{
5814 unsigned long flags;
5815
5816 spin_lock_irqsave(&x->wait.lock, flags);
5817 x->done += n;
5818 __wake_up_common(&x->wait, TASK_NORMAL, n, 0, NULL);
5819 spin_unlock_irqrestore(&x->wait.lock, flags);
5820}
5821EXPORT_SYMBOL(complete_n);
5822
5812static inline long __sched 5823static inline long __sched
5813do_wait_for_common(struct completion *x, long timeout, int state) 5824do_wait_for_common(struct completion *x, long timeout, int state)
5814{ 5825{