Linus Torvalds <[email protected]> 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

-- 
[email protected] -- Speaking for myself only
--
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/

Reply via email to