On Wed, 6 Dec 2006, Matthew Wilcox wrote: > And for those of us with only load-and-zero, that's simply: > > #define load_locked(addr) spin_lock(hash(addr)), *addr > #define store_exclusive(addr, old, new) \ > *addr = new, spin_unlock(hash(addr)), 0 > > which is also optimal for us. This means we tolerate the assignment race for SMP that was pointed out earlier? cmpxchg emulation may then also be tolerable just replace the irq enable/disable in David's implementation with taking a spin lock? - 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/
- Follow-Ups:
- References:
- [PATCH] WorkStruct: Implement generic UP cmpxchg() where an arch doesn't support it
- From: David Howells <[email protected]>
- Re: [PATCH] WorkStruct: Implement generic UP cmpxchg() where an arch doesn't support it
- From: Christoph Lameter <[email protected]>
- Re: [PATCH] WorkStruct: Implement generic UP cmpxchg() where an arch doesn't support it
- From: Russell King <[email protected]>
- Re: [PATCH] WorkStruct: Implement generic UP cmpxchg() where an arch doesn't support it
- From: Christoph Lameter <[email protected]>
- Re: [PATCH] WorkStruct: Implement generic UP cmpxchg() where an arch doesn't support it
- From: Russell King <[email protected]>
- Re: [PATCH] WorkStruct: Implement generic UP cmpxchg() where an arch doesn't support it
- From: Matthew Wilcox <[email protected]>
- [PATCH] WorkStruct: Implement generic UP cmpxchg() where an arch doesn't support it
- Prev by Date: Re: [perfmon] 2.6.19 new perfmon code base + libpfm + pfmon
- Next by Date: Re: utrace comments
- Previous by thread: Re: [PATCH] WorkStruct: Implement generic UP cmpxchg() where an arch doesn't support it
- Next by thread: Re: [PATCH] WorkStruct: Implement generic UP cmpxchg() where an arch doesn't support it
- Index(es):