Thread (209 messages) 209 messages, 31 authors, 2005-12-22

Re: [PATCH 1/19] MUTEX: Introduce simple mutex implementation

From: Nick Piggin <hidden>
Date: 2005-12-14 11:18:01
Also in: lkml

David Howells wrote:
Nick Piggin [off-list ref] wrote:

quoted
atomic_cmpxchg should be available on all platforms.

Two points:

 (1) If it's using spinlocks, then it's pointless to use atomic_cmpxchg.
Why?
 (2) atomic_t is a 32-bit type, and on a 64-bit platform I will want a 64-bit
     type so that I can stick the owner address in there (I've got a second
     variant not yet released).
I'm sure you could use a seperate field as it would be a debug
option, right?

But atomic longs are coming along and it is probably feasable to
do 64-bit atomic_cmpxchg on all 64-bit word architectures if you
really needed that.

Send instant messages to your online friends http://au.messenger.yahoo.com 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help