diff options
author | Igor Sysoev <igor@sysoev.ru> | 2006-12-19 15:23:20 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2006-12-19 15:23:20 +0000 |
commit | 73dcdbf1a30968f84c97cc6a4165a9f5d823e8b2 (patch) | |
tree | fbb428221a6873ee7ff8b2aad494fe91849ebcdd /src | |
parent | 34be8873ca1026571956fc0fe7b59f1a237e57f0 (diff) | |
download | nginx-73dcdbf1a30968f84c97cc6a4165a9f5d823e8b2.tar.gz nginx-73dcdbf1a30968f84c97cc6a4165a9f5d823e8b2.zip |
use light-weight sync on ppc64
Diffstat (limited to 'src')
-rw-r--r-- | src/os/unix/ngx_gcc_atomic_ppc.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/os/unix/ngx_gcc_atomic_ppc.h b/src/os/unix/ngx_gcc_atomic_ppc.h index 147c44f31..68d244e41 100644 --- 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, ngx_atomic_int_t add) 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, ngx_atomic_int_t add) 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, ngx_atomic_int_t add) #define ngx_memory_barrier() __asm__ volatile ("" ::: "memory") #endif +#endif + + #define ngx_cpu_pause() |