Messages in this thread | | | From | David Howells <> | Subject | Re: [PATCH 09/10] x86 rwsem: down_read_critical implementation | Date | Wed, 19 May 2010 15:36:06 +0100 |
| |
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>
| |