Messages in this thread | | | From | Andi Kleen <> | Subject | Re: [PATCH v7 1/4] qrwlock: A queue read/write lock implementation | Date | Wed, 18 Dec 2013 11:38:29 -0800 |
| |
Linus Torvalds <torvalds@linux-foundation.org> writes: > > In this case, we seem to want the xadd() semantics. I guess we can use > "atomic_add_return(val,&atomic)-val" and just assume that the compiler > gets it right (with the addition and the subtraction cancelling out).
It can't, as we use inline assembler.
In theory it could with __sync_* or __atomic_* intrinsics but we traditionally don't use them as they don't support patchable LOCK
(maybe it would be time to get rid of the patchable LOCK though?)
-Andi
-- ak@linux.intel.com -- Speaking for myself only
| |