Subject: Re: PATCH powerpc Merge asm-ppc*/rwsem.h

From: David Howells <[email-masked]>
Date: Fri, 23 Sep 2005 08:52:30 +0100

Anton Blanchard <[email-masked]> wrote:

> > The counter should be "signed long" really.
> 
> Agreed, we should move to a 64bit count.

With a 64-bit counter, the constants should be:

#define RWSEM_UNLOCKED_VALUE		  0x0000000000000000L
#define RWSEM_ACTIVE_BIAS		  0x0000000000000001L
#define RWSEM_ACTIVE_MASK		  0x00000000ffffffffL
#define RWSEM_WAITING_BIAS		(-0x0000000100000000L)
#define RWSEM_ACTIVE_READ_BIAS		RWSEM_ACTIVE_BIAS
#define RWSEM_ACTIVE_WRITE_BIAS		(RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS)

Just like in the asm-s390/rwsem.h.

David