[Commits] Rev 4315: MDEV-6450 - MariaDB crash on Power8 when built with advance in lp:maria/10.0

Sergey Vojtovich svoj at mariadb.org
Thu Jul 31 13:31:14 EEST 2014


At lp:maria/10.0

------------------------------------------------------------
revno: 4315
revision-id: svoj at mariadb.org-20140731103105-mguqgow0lo21hqxt
parent: sergii at pisem.net-20140731075105-83gm8bnwlsohumdy
committer: Sergey Vojtovich <svoj at mariadb.org>
branch nick: 10.0
timestamp: Thu 2014-07-31 14:31:05 +0400
message:
  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.
=== modified file 'storage/innobase/include/os0sync.h'
--- a/storage/innobase/include/os0sync.h	2014-07-18 11:16:25 +0000
+++ b/storage/innobase/include/os0sync.h	2014-07-31 10:31:05 +0000
@@ -638,13 +638,13 @@ InterlockedExchange() operates on LONG,
 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 \

=== modified file 'storage/xtradb/include/os0sync.h'
--- a/storage/xtradb/include/os0sync.h	2014-07-18 11:16:25 +0000
+++ b/storage/xtradb/include/os0sync.h	2014-07-31 10:31:05 +0000
@@ -638,13 +638,13 @@ InterlockedExchange() operates on LONG,
 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 \



More information about the commits mailing list