Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d9514f6c6b95b5a747ba902858eff577281e8659
Commit:     d9514f6c6b95b5a747ba902858eff577281e8659
Parent:     6618a3e275519e10001a2ac4669f46141d4c108b
Author:     Matthew Wilcox <[EMAIL PROTECTED]>
AuthorDate: Thu Dec 6 11:07:07 2007 -0500
Committer:  Matthew Wilcox <[EMAIL PROTECTED]>
CommitDate: Thu Dec 6 17:34:59 2007 -0500

    sched: Use task_contributes_to_load, TASK_ALL and TASK_NORMAL
    
    Signed-off-by: Matthew Wilcox <[EMAIL PROTECTED]>
---
 kernel/sched.c |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index 67d9d17..50a0faa 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -992,7 +992,7 @@ static int effective_prio(struct task_struct *p)
  */
 static void activate_task(struct rq *rq, struct task_struct *p, int wakeup)
 {
-       if (p->state == TASK_UNINTERRUPTIBLE)
+       if (task_contributes_to_load(p))
                rq->nr_uninterruptible--;
 
        enqueue_task(rq, p, wakeup);
@@ -1004,7 +1004,7 @@ static void activate_task(struct rq *rq, struct 
task_struct *p, int wakeup)
  */
 static void deactivate_task(struct rq *rq, struct task_struct *p, int sleep)
 {
-       if (p->state == TASK_UNINTERRUPTIBLE)
+       if (task_contributes_to_load(p))
                rq->nr_uninterruptible++;
 
        dequeue_task(rq, p, sleep);
@@ -1646,8 +1646,7 @@ out:
 
 int fastcall wake_up_process(struct task_struct *p)
 {
-       return try_to_wake_up(p, TASK_STOPPED | TASK_TRACED |
-                                TASK_INTERRUPTIBLE | TASK_UNINTERRUPTIBLE, 0);
+       return try_to_wake_up(p, TASK_ALL, 0);
 }
 EXPORT_SYMBOL(wake_up_process);
 
@@ -3857,8 +3856,7 @@ void complete(struct completion *x)
 
        spin_lock_irqsave(&x->wait.lock, flags);
        x->done++;
-       __wake_up_common(&x->wait, TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE,
-                        1, 0, NULL);
+       __wake_up_common(&x->wait, TASK_NORMAL, 1, 0, NULL);
        spin_unlock_irqrestore(&x->wait.lock, flags);
 }
 EXPORT_SYMBOL(complete);
@@ -3869,8 +3867,7 @@ void complete_all(struct completion *x)
 
        spin_lock_irqsave(&x->wait.lock, flags);
        x->done += UINT_MAX/2;
-       __wake_up_common(&x->wait, TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE,
-                        0, 0, NULL);
+       __wake_up_common(&x->wait, TASK_NORMAL, 0, 0, NULL);
        spin_unlock_irqrestore(&x->wait.lock, flags);
 }
 EXPORT_SYMBOL(complete_all);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to