lkml.org 
[lkml]   [2010]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 09/10] x86 rwsem: down_read_critical implementation
Date
Michel Lespinasse <walken@google.com> wrote:

> The basic properties that have been true so far still hold:
> - RWSEM_ACTIVE_READ_BIAS & RWSEM_ACTIVE_MASK == 1
> - RWSEM_ACTIVE_WRITE_BIAS & RWSEM_ACTIVE_MASK == 1
> - RWSEM_WAITING_BIAS & RWSEM_ACTIVE_MASK == 0
> - RWSEM_ACTIVE_WRITE_BIAS < 0 and RWSEM_WAITING_BIAS < 0
>
> A new property is introduced: RWSEM_ACTIVE_WRITE_BIAS is set to be
> 'more negative' than RWSEM_WAITING_BIAS. This way, even the first writer
> will set the rwsem count to be < RWSEM_WAITING_BIAS and down_read_critical()
> can make use of this to determine if there are any active writers.
>
> Signed-off-by: Michel Lespinasse <walken@google.com>

Acked-by: David Howells <dhowells@redhat.com>


\
 
 \ /
  Last update: 2010-05-19 16:39    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site