Re: [PATCH -mm] update comment in rtmutex.c and friends

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>

Acked-by: Thomas Gleixner <[email protected]>


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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux