patch-1.3.84 linux/kernel/sched.c
Next file: linux/mm/kmalloc.c
Previous file: linux/include/linux/skbuff.h
Back to the patch index
Back to the overall index
-  Lines: 17
 -  Date:
Thu Apr  4 13:34:13 1996
 -  Orig file: 
v1.3.83/linux/kernel/sched.c
 -  Orig date: 
Wed Apr  3 16:06:57 1996
 
diff -u --recursive --new-file v1.3.83/linux/kernel/sched.c linux/kernel/sched.c
@@ -179,11 +179,15 @@
 	struct task_struct *next = p->next_run;
 	struct task_struct *prev = p->prev_run;
 
+	/* remove from list */
 	next->prev_run = prev;
 	prev->next_run = next;
-	(p->prev_run = init_task.prev_run)->next_run = p;
+	/* add back to list */
 	p->next_run = &init_task;
+	prev = init_task.prev_run;
 	init_task.prev_run = p;
+	p->prev_run = prev;
+	prev->next_run = p;
 }
 
 /*
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this