patch-2.4.0-test12 linux/kernel/exit.c
Next file: linux/kernel/fork.c
Previous file: linux/kernel/dma.c
Back to the patch index
Back to the overall index
- Lines: 48
- Date:
Thu Dec 7 11:53:26 2000
- Orig file:
v2.4.0-test11/linux/kernel/exit.c
- Orig date:
Sun Nov 19 18:44:23 2000
diff -u --recursive --new-file v2.4.0-test11/linux/kernel/exit.c linux/kernel/exit.c
@@ -22,7 +22,7 @@
int getrusage(struct task_struct *, int, struct rusage *);
-static void release(struct task_struct * p)
+static void release_task(struct task_struct * p)
{
if (p != current) {
#ifdef CONFIG_SMP
@@ -31,15 +31,15 @@
* runqueue (active on some other CPU still)
*/
for (;;) {
- spin_lock_irq(&runqueue_lock);
+ task_lock(p);
if (!p->has_cpu)
break;
- spin_unlock_irq(&runqueue_lock);
+ task_unlock(p);
do {
barrier();
} while (p->has_cpu);
}
- spin_unlock_irq(&runqueue_lock);
+ task_unlock(p);
#endif
atomic_dec(&p->user->processes);
free_uid(p->user);
@@ -302,9 +302,9 @@
{
struct mm_struct * mm = tsk->mm;
+ mm_release();
if (mm) {
atomic_inc(&mm->mm_count);
- mm_release();
if (mm != tsk->active_mm) BUG();
/* more a memory barrier than a real lock */
task_lock(tsk);
@@ -550,7 +550,7 @@
do_notify_parent(p, SIGCHLD);
write_unlock_irq(&tasklist_lock);
} else
- release(p);
+ release_task(p);
goto end_wait4;
default:
continue;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)