On 1/15/21 10:34 AM, Alexandre Julliard wrote:
Zebediah Figura z.figura12@gmail.com writes:
Signed-off-by: Zebediah Figura z.figura12@gmail.com
v2: avoid 16-bit __atomic_compare_exchange_n()
include/winnt.h | 53 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+)
How are these better than the __sync ones in practice?
I think the only real benefit is atomic exchange; it allows the compiler to maybe yield better code for x86 than our inline assembly (although it surely would never make a difference in practice), and presumably better code for other platforms than a compare-and-swap loop.
The actual practical benefit is probably negligible, but I figured we might as well use a proper compiler intrinsic for atomic swap if there was one available.