lkml.org 
[lkml]   [2008]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 2/3] wait_task_inactive: fix the !CONFIG_SMP version
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



\
 
 \ /
  Last update: 2008-07-30 19:09    [W:2.360 / U:1.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site