diff --git a/CHANGES b/CHANGES index 2ababacfcb..943991b7a7 100644 --- 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] 3062. [func] Made several changes to enhance human readability diff --git a/lib/isc/powerpc/include/isc/atomic.h b/lib/isc/powerpc/include/isc/atomic.h index 6f54cc3b48..c8a617fd8a 100644 --- a/lib/isc/powerpc/include/isc/atomic.h +++ b/lib/isc/powerpc/include/isc/atomic.h @@ -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.9 2011/03/07 00:17:08 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)