# HG changeset patch # User Igor Sysoev # Date 1166541800 0 # Node ID db8e718447f139564a1806b624b77b7132537b41 # Parent 4745e72044fb8fce37fb208874c71ee2b668b5b4 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 --- a/src/os/unix/ngx_gcc_atomic_ppc.h +++ b/src/os/unix/ngx_gcc_atomic_ppc.h @@ -67,6 +67,13 @@ ngx_atomic_fetch_add(ngx_atomic_t *value 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 @@ ngx_atomic_fetch_add(ngx_atomic_t *value return res; } -#endif - #if (NGX_SMP) #define ngx_memory_barrier() __asm__ volatile ("sync\n" ::: "memory") @@ -126,4 +131,7 @@ ngx_atomic_fetch_add(ngx_atomic_t *value #define ngx_memory_barrier() __asm__ volatile ("" ::: "memory") #endif +#endif + + #define ngx_cpu_pause()