patch-2.4.15 linux/kernel/exit.c

Next file: linux/kernel/fork.c
Previous file: linux/kernel/exec_domain.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.14/linux/kernel/exit.c linux/kernel/exit.c
@@ -35,12 +35,13 @@
 		 */
 		for (;;) {
 			task_lock(p);
-			if (!p->has_cpu)
+			if (!task_has_cpu(p))
 				break;
 			task_unlock(p);
 			do {
+				cpu_relax();
 				barrier();
-			} while (p->has_cpu);
+			} while (task_has_cpu(p));
 		}
 		task_unlock(p);
 #endif

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)