patch-2.0.18 linux/kernel/sched.c

Next file: linux/mm/filemap.c
Previous file: linux/init/main.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.17/linux/kernel/sched.c linux/kernel/sched.c
@@ -1180,8 +1180,10 @@
 
 	p->policy = policy;
 	p->rt_priority = lp.sched_priority;
+	cli();
 	if (p->next_run)
 		move_last_runqueue(p);
+	sti();
 	schedule();
 
 	return 0;
@@ -1237,8 +1239,9 @@
 
 asmlinkage int sys_sched_yield(void)
 {
+	cli();
 	move_last_runqueue(current);
-
+	sti();
 	return 0;
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov