aboutsummaryrefslogtreecommitdiff
path: root/src/os/unix/ngx_gcc_atomic_x86.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/unix/ngx_gcc_atomic_x86.h')
-rw-r--r--src/os/unix/ngx_gcc_atomic_x86.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/os/unix/ngx_gcc_atomic_x86.h b/src/os/unix/ngx_gcc_atomic_x86.h
index e3c0c9379..3053e72ff 100644
--- a/src/os/unix/ngx_gcc_atomic_x86.h
+++ b/src/os/unix/ngx_gcc_atomic_x86.h
@@ -101,3 +101,11 @@ ngx_atomic_fetch_add(ngx_atomic_t *value, ngx_atomic_int_t add)
}
#endif
+
+
+/*
+ * on x86 the write operations go in a program order, so we need only
+ * to disable the gcc reorder optimizations
+ */
+
+#define ngx_memory_barrier() __asm__ volatile ("" ::: "memory")