lkml.org 
[lkml]   [2006]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH -mm] update comment in rtmutex.c and friends
From
Date
On Sat, 2006-05-13 at 19:34 -0400, Steven Rostedt wrote:
> The documented state in both the code and the rt-mutex.txt has a slight
> incorrect statement. They state that if the owner of the mutex is NULL,
> and the "mutex has waiters" bit is set that it is an invalid state.
>
> This is not true. To synchronize with an owner releasing the mutex, the
> owner field must have the "mutex has waiters" bit set before trying to
> grab the lock. This prevents the owner from releasing the lock without going
> into the slow unlock path. But if the mutex doesn't have an owner, then
> before the current process grabs the lock, it sets the "mutex has waiters"
> bit. But in this case it will grab the lock and clear the bit. So the
> "mutex has waiters" bit and owner == NULL is a transitional state.
>
> This patch comments this case.
>
> -- Steve
>
>
> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

Acked-by: Thomas Gleixner <tglx@linutronix.de>


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-05-14 01:38    [W:0.046 / U:0.496 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site