use light-weight sync on ppc64
diff --git a/src/os/unix/ngx_gcc_atomic_ppc.h b/src/os/unix/ngx_gcc_atomic_ppc.h
index 147c44f..68d244e 100644
--- a/src/os/unix/ngx_gcc_atomic_ppc.h
+++ b/src/os/unix/ngx_gcc_atomic_ppc.h
@@ -67,6 +67,13 @@
return res;
}
+
+#if (NGX_SMP)
+#define ngx_memory_barrier() __asm__ volatile ("lwsync\n" ::: "memory")
+#else
+#define ngx_memory_barrier() __asm__ volatile ("" ::: "memory")
+#endif
+
#else
static ngx_inline ngx_atomic_uint_t
@@ -117,8 +124,6 @@
return res;
}
-#endif
-
#if (NGX_SMP)
#define ngx_memory_barrier() __asm__ volatile ("sync\n" ::: "memory")
@@ -126,4 +131,7 @@
#define ngx_memory_barrier() __asm__ volatile ("" ::: "memory")
#endif
+#endif
+
+
#define ngx_cpu_pause()