]> 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:34:20 +0000 (00:34 +0000)
committerMark Andrews <marka@isc.org>
Mon, 7 Mar 2011 00:34:20 +0000 (00:34 +0000)
                        operations. [RT #23469]

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

diff --git a/CHANGES b/CHANGES
index c7f59d19b17c9a2afe192b3dcc0c853d37c2fed9..f9541f7d06f38ee9fb9923c39c72e404a8f4653e 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+3064.  [bug]           powerpc: add sync instructions to the end of atomic
+                       operations. [RT #23469]
+
 3058.   [bug]           Cause named to terminate at startup or rndc reconfig/
                         reload to fail, if a log file specified in the conf
                         file isn't a plain file. [RT #22771]
index 30db328a433f073bf8894f3417bfd9c1ead9870a..94a3ab41da81887ff2d01ad4440e17e12feb12f2 100644 (file)
@@ -14,7 +14,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: atomic.h,v 1.1.6.6 2007/08/28 07:20:06 tbox Exp $ */
+/* $Id: atomic.h,v 1.1.6.7 2011/03/07 00:34:20 marka Exp $ */
 
 #ifndef ISC_ATOMIC_H
 #define ISC_ATOMIC_H 1
@@ -86,7 +86,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)
@@ -110,7 +111,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)
@@ -142,7 +144,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)