Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxx -- Speaking for myself only -- To unsubscribe from this list: send the line "unsubscribe linux-arch" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html