mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@tv-sign.ru>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Ingo Molnar <mingo@elte.hu>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Roland McGrath <roland@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 2/3] wait_task_inactive: fix the !CONFIG_SMP version
Date: Wed, 30 Jul 2008 21:09:48 +0400	[thread overview]
Message-ID: <20080730170948.GA18679@tv-sign.ru> (raw)

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
 


                 reply	other threads:[~2008-07-30 17:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080730170948.GA18679@tv-sign.ru \
    --to=oleg@tv-sign.ru \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=roland@redhat.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®