mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 2/3] wait_task_inactive: fix the !CONFIG_SMP version
@ 2008-07-30 17:09 Oleg Nesterov
  0 siblings, 0 replies; only message in thread
From: Oleg Nesterov @ 2008-07-30 17:09 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Ingo Molnar, Linus Torvalds, Roland McGrath, linux-kernel

The semantics of wait_task_inactive() was changed, update the !SMP
version accordingly.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>

--- 27/include/linux/sched.h~2_WTI_DUMMY	2008-07-30 13:12:48.000000000 +0400
+++ 27/include/linux/sched.h	2008-07-30 20:28:31.000000000 +0400
@@ -1880,7 +1880,9 @@ extern unsigned long wait_task_inactive(
 static inline unsigned long wait_task_inactive(struct task_struct *p,
 					       long match_state)
 {
-	return 1;
+	if (match_state && unlikely(p->state != match_state))
+		return 0;
+	return p->nvcsw | LONG_MIN; /* sets MSB */
 }
 #endif
 


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-07-30 17:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-30 17:09 [PATCH 2/3] wait_task_inactive: fix the !CONFIG_SMP version Oleg Nesterov

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®