]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
3064. [bug] powerpc: add sync instructions to the end of atomic
authorMark Andrews <marka@isc.org>
Mon, 7 Mar 2011 00:19:38 +0000 (00:19 +0000)
committerMark Andrews <marka@isc.org>
Mon, 7 Mar 2011 00:19:38 +0000 (00:19 +0000)
                        operations. [RT #23469]

CHANGES
lib/isc/powerpc/include/isc/atomic.h

diff --git a/CHANGES b/CHANGES
index 25fa177d6eee5c443d7572d2a920b107d2813dd9..72ab45c4ec154cc1d86df22a3e241ce385dfdb71 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+3064.  [bug]           powerpc: add sync instructions to the end of atomic
+                       operations. [RT #23469]
+
 3063.  [contrib]       More verbose error reporting from DLZ LDAP. [RT #23402]
 
 3059.  [test]          Added a regression test for change #3023.
index 6f54cc3b48811a8cc5fcfb3e84a9bbcbcbe5abe6..ed094cf11a5b0b09840b30184045115eab852c1a 100644 (file)
@@ -14,7 +14,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: atomic.h,v 1.8 2009/10/14 23:47:51 tbox Exp $ */
+/* $Id: atomic.h,v 1.8.284.1 2011/03/07 00:19:38 marka Exp $ */
 
 #ifndef ISC_ATOMIC_H
 #define ISC_ATOMIC_H 1
@@ -117,7 +117,8 @@ isc_atomic_xadd(isc_int32_t *p, isc_int32_t val) {
                "mr %0, 6\n"
                "add 6, 6, %2\n"
                "stwcx. 6, 0, %1\n"
-               "bne- 1b"
+               "bne- 1b\n"
+               "sync"
 #endif
                : "=&r"(orig)
                : "r"(p), "r"(val)
@@ -141,7 +142,8 @@ isc_atomic_store(void *p, isc_int32_t val) {
                "lwarx 6, 0, %0\n"
                "lwz 6, %1\n"
                "stwcx. 6, 0, %0\n"
-               "bne- 1b"
+               "bne- 1b\n"
+               "sync"
 #endif
                :
                : "r"(p), "m"(val)
@@ -173,7 +175,8 @@ isc_atomic_cmpxchg(isc_int32_t *p, isc_int32_t cmpval, isc_int32_t val) {
                "mr 6, %3\n"
                "stwcx. 6, 0, %1\n"
                "bne- 1b\n"
-               "2:"
+               "2:\n"
+               "sync"
 #endif
                : "=&r" (orig)
                : "r"(p), "r"(cmpval), "r"(val)