--- glibc-2.2.3/sysdeps/powerpc/atomicity.h.orig Mon Jun 25 12:25:32 2001 +++ glibc-2.2.3/sysdeps/powerpc/atomicity.h Mon Jun 25 12:26:10 2001 @@ -36,6 +36,7 @@ __asm__ ("\ 0: lwarx %0,0,%2 add%I3 %1,%0,%3 + sync stwcx. %1,0,%2 bne- 0b " : "=&b"(result), "=&r"(tmp) : "r" (mem), "Ir"(val) : "cr0", "memory"); @@ -50,6 +51,7 @@ __asm__ ("\ 0: lwarx %0,0,%1 add%I2 %0,%0,%2 + sync stwcx. %0,0,%1 bne- 0b " : "=&b"(tmp) : "r" (mem), "Ir"(val) : "cr0", "memory"); @@ -65,6 +67,7 @@ sub%I2c. %0,%0,%2 cntlzw %0,%0 bne- 1f + sync stwcx. %3,0,%1 bne- 0b 1: @@ -79,6 +82,7 @@ long int result; __asm__ ("\ 0: lwarx %0,0,%1 + sync stwcx. %2,0,%1 bne- 0b " : "=&r"(result) : "r"(p), "r"(newval) : "cr0", "memory"); @@ -94,6 +98,7 @@ 0: lwarx %0,0,%1 cmpwi %0,0 bne- 1f + sync stwcx. %2,0,%1 bne- 0b 1: --- glibc-2.2.3/linuxthreads/sysdeps/powerpc/pt-machine.h.orig Mon Jun 25 12:26:26 2001 +++ glibc-2.2.3/linuxthreads/sysdeps/powerpc/pt-machine.h Mon Jun 25 12:26:46 2001 @@ -56,6 +56,7 @@ "0: lwarx %0,0,%1 ;" " xor. %0,%3,%0;" " bne 1f;" + " sync;" " stwcx. %2,0,%1;" " bne- 0b;" "1: "