[patch] [sched] unlock_task_rq() cleanup, 2.5.3-pre3

Ingo Molnar (mingo@elte.hu)
Fri, 25 Jan 2002 15:29:52 +0100 (CET)


the attached patch implements a cleanup suggested by Robert Love, it
removes an unused parameter from unlock_task_rq().

Ingo

--- linux/kernel/sched.c.orig Fri Jan 25 10:44:18 2002
+++ linux/kernel/sched.c Fri Jan 25 12:06:36 2002
@@ -70,8 +70,7 @@
return __rq;
}

-static inline void unlock_task_rq(runqueue_t *rq, task_t *p,
- unsigned long *flags)
+static inline void unlock_task_rq(runqueue_t *rq, unsigned long *flags)
{
spin_unlock_irqrestore(&rq->lock, *flags);
}
@@ -202,10 +220,10 @@
}
rq = lock_task_rq(p, &flags);
if (unlikely(rq->curr == p)) {
- unlock_task_rq(rq, p, &flags);
+ unlock_task_rq(rq, &flags);
goto repeat;
}
- unlock_task_rq(rq, p, &flags);
+ unlock_task_rq(rq, &flags);
}

/*
@@ -260,7 +278,7 @@
resched_task(rq->curr);
success = 1;
}
- unlock_task_rq(rq, p, &flags);
+ unlock_task_rq(rq, &flags);
return success;
}

@@ -846,7 +880,7 @@
resched_task(rq->curr);
}
out_unlock:
- unlock_task_rq(rq, p, &flags);
+ unlock_task_rq(rq, &flags);
}

#ifndef __alpha__
@@ -966,7 +1000,7 @@
activate_task(p, task_rq(p));

out_unlock:
- unlock_task_rq(rq, p, &flags);
+ unlock_task_rq(rq, &flags);
out_unlock_tasklist:
read_unlock_irq(&tasklist_lock);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/