diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-08-08 18:54:49 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-08-08 18:54:49 +0000 |
commit | 5514f4babeeb3af00ee0c325e3cda7a562cc3d65 (patch) | |
tree | edd733879cab73e41324a99ca5da7bc154c4196d /kernel/exit.c | |
parent | 6a9366db547e958e8c9bf8e1c13bcea6cb2bf393 (diff) |
Merge with Linux 2.4.0-test6-pre4.
Diffstat (limited to 'kernel/exit.c')
-rw-r--r-- | kernel/exit.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index 993ba31f3..3e95fe878 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -26,17 +26,20 @@ void release(struct task_struct * p) { if (p != current) { #ifdef CONFIG_SMP - int has_cpu; - /* * Wait to make sure the process isn't on the * runqueue (active on some other CPU still) */ - do { + for (;;) { spin_lock_irq(&runqueue_lock); - has_cpu = p->has_cpu; + if (!p->has_cpu) + break; spin_unlock_irq(&runqueue_lock); - } while (has_cpu); + do { + barrier(); + } while (p->has_cpu); + } + spin_unlock_irq(&runqueue_lock); #endif atomic_dec(&p->user->processes); free_uid(p->user); |