mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH -mm 6/6] cpu_relax(): ptrace.c coding style fix
@ 2006-06-21 21:00 Andreas Mohr
  2006-06-22 14:32 ` Nathan Lynch
  2006-06-22 15:08 ` Pavel Machek
  0 siblings, 2 replies; 4+ messages in thread
From: Andreas Mohr @ 2006-06-21 21:00 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel


Fix existing cpu_relax() loop to have proper kernel style.


Tested on 2.6.17-mm1.

Signed-off-by: Andreas Mohr <andi@lisas.de>


diff -urN linux-2.6.17-mm1.orig/kernel/ptrace.c linux-2.6.17-mm1.my/kernel/ptrace.c
--- linux-2.6.17-mm1.orig/kernel/ptrace.c	2006-06-21 14:28:20.000000000 +0200
+++ linux-2.6.17-mm1.my/kernel/ptrace.c	2006-06-21 14:43:24.000000000 +0200
@@ -182,9 +182,8 @@
 	if (!write_trylock(&tasklist_lock)) {
 		local_irq_enable();
 		task_unlock(task);
-		do {
+		while (!write_can_lock(&tasklist_lock))
 			cpu_relax();
-		} while (!write_can_lock(&tasklist_lock));
 		goto repeat;
 	}
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-06-22 19:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-21 21:00 [PATCH -mm 6/6] cpu_relax(): ptrace.c coding style fix Andreas Mohr
2006-06-22 14:32 ` Nathan Lynch
2006-06-22 15:53   ` Andreas Mohr
2006-06-22 15:08 ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®