Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/unix/ngx_gcc_atomic_ppc.h')
-rw-r--r--src/os/unix/ngx_gcc_atomic_ppc.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/os/unix/ngx_gcc_atomic_ppc.h b/src/os/unix/ngx_gcc_atomic_ppc.h
index 8fc3bc041..58b24c31a 100644
--- a/src/os/unix/ngx_gcc_atomic_ppc.h
+++ b/src/os/unix/ngx_gcc_atomic_ppc.h
@@ -64,3 +64,10 @@ ngx_atomic_fetch_add(ngx_atomic_t *value, ngx_atomic_int_t add)
return res;
}
+
+
+#if (NGX_SMP)
+#define ngx_memory_barrier() __asm__ volatile ("sync\n" ::: "memory")
+#else
+#define ngx_memory_barrier() __asm__ volatile ("" ::: "memory")
+#endif