mirror of
https://github.com/nginx/nginx.git
synced 2026-08-04 06:53:10 +00:00
use light-weight sync on ppc64
This commit is contained in:
parent
34be8873ca
commit
73dcdbf1a3
1 changed files with 10 additions and 2 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue