Commit 53360fd4 authored by Sergey Vojtovich's avatar Sergey Vojtovich

MDEV-6450 - MariaDB crash on Power8 when built with advance

            tool chain

This is an addition to the original patch. On Windows
InterlockedExchange implies full memory barrier, whereas
only acquire/release barriers required.
parent a40be4cc
......@@ -638,13 +638,13 @@ InterlockedExchange() operates on LONG, and the LONG will be
clobbered */
# define os_atomic_test_and_set_byte(ptr, new_val) \
((byte) InterlockedExchange(ptr, new_val))
((byte) InterlockedExchangeAcquire(ptr, new_val))
# define os_atomic_test_and_set_ulong(ptr, new_val) \
InterlockedExchange(ptr, new_val)
InterlockedExchangeAcquire(ptr, new_val)
# define os_atomic_lock_release_byte(ptr) \
(void) InterlockedExchange(ptr, 0)
(void) InterlockedAndRelease(ptr, 0)
#else
# define IB_ATOMICS_STARTUP_MSG \
......
......@@ -638,13 +638,13 @@ InterlockedExchange() operates on LONG, and the LONG will be
clobbered */
# define os_atomic_test_and_set_byte(ptr, new_val) \
((byte) InterlockedExchange(ptr, new_val))
((byte) InterlockedExchangeAcquire(ptr, new_val))
# define os_atomic_test_and_set_ulong(ptr, new_val) \
InterlockedExchange(ptr, new_val)
InterlockedExchangeAcquire(ptr, new_val)
# define os_atomic_lock_release_byte(ptr) \
(void) InterlockedExchange(ptr, 0)
(void) InterlockedAndRelease(ptr, 0)
#else
# define IB_ATOMICS_STARTUP_MSG \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment