summaryrefslogtreecommitdiff
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorJody McIntyre <scjody@modernduck.com>2005-02-09 08:19:10 -0500
committerJody McIntyre <scjody@modernduck.com>2005-02-09 08:19:10 -0500
commit23750010bfa81de0867ddd4bd4bd7c9b2d27fe05 (patch)
tree0b0b2ff8aab00bf3dcb5753a2e7a1217194c1312 /kernel/sched.c
parentc5ff533d2618c3c26242551e2a9957763f126e2c (diff)
parent245f9eba891010ed627fec5b83d0f7b575e3d5ce (diff)
Merge modernduck.com:/usr/src/bk/linux-2.5
into modernduck.com:/usr/src/bk/1394-2.6
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index f708d10e7750..95042b27d30c 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -867,7 +867,7 @@ void wait_task_inactive(task_t * p)
repeat:
rq = task_rq_lock(p, &flags);
/* Must be off runqueue entirely, not preempted. */
- if (unlikely(p->array)) {
+ if (unlikely(p->array || task_running(rq, p))) {
/* If it's preempted, we yield. It could be a while. */
preempted = !task_running(rq, p);
task_rq_unlock(rq, &flags);
@@ -885,6 +885,12 @@ repeat:
*
* Cause a process which is running on another CPU to enter
* kernel-mode, without any delay. (to get signals handled.)
+ *
+ * NOTE: this function doesnt have to take the runqueue lock,
+ * because all it wants to ensure is that the remote task enters
+ * the kernel. If the IPI races and the task has been migrated
+ * to another CPU then no harm is done and the purpose has been
+ * achieved as well.
*/
void kick_process(task_t *p)
{