diff options
author | Igor Sysoev <igor@sysoev.ru> | 2007-07-16 08:54:04 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2007-07-16 08:54:04 +0000 |
commit | d3cdbc85e800c2678fcdfca7b6e4792c59d5838b (patch) | |
tree | cdfd7c4fa01b1613daadc19c9fc323f1d2ed4cf7 /src/os/unix/ngx_atomic.h | |
parent | de27bce24edee11c33232c86357c398a87811420 (diff) | |
download | nginx-d3cdbc85e800c2678fcdfca7b6e4792c59d5838b.tar.gz nginx-d3cdbc85e800c2678fcdfca7b6e4792c59d5838b.zip |
Sun Studio 12 compatibility
Diffstat (limited to 'src/os/unix/ngx_atomic.h')
-rw-r--r-- | src/os/unix/ngx_atomic.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/os/unix/ngx_atomic.h b/src/os/unix/ngx_atomic.h index ec90855ae..22b8b0144 100644 --- a/src/os/unix/ngx_atomic.h +++ b/src/os/unix/ngx_atomic.h @@ -87,10 +87,17 @@ ngx_atomic_cmp_set(ngx_atomic_t *lock, ngx_atomic_uint_t old, ngx_atomic_int_t ngx_atomic_fetch_add(ngx_atomic_t *value, ngx_atomic_int_t add); +/* + * Sun Studio 12 exits with segmentation fault on '__asm ("pause")', + * so ngx_cpu_pause is declared in src/os/unix/ngx_sunpro_x86.il + */ + +void +ngx_cpu_pause(void); + /* the code in src/os/unix/ngx_sunpro_x86.il */ #define ngx_memory_barrier() __asm (".volatile"); __asm (".nonvolatile") -#define ngx_cpu_pause() __asm ("pause") #else /* ( __GNUC__ || __INTEL_COMPILER ) */ @@ -121,10 +128,17 @@ ngx_atomic_cmp_set(ngx_atomic_t *lock, ngx_atomic_uint_t old, ngx_atomic_int_t ngx_atomic_fetch_add(ngx_atomic_t *value, ngx_atomic_int_t add); +/* + * Sun Studio 12 exits with segmentation fault on '__asm ("pause")', + * so ngx_cpu_pause is declared in src/os/unix/ngx_sunpro_amd64.il + */ + +void +ngx_cpu_pause(void); + /* the code in src/os/unix/ngx_sunpro_amd64.il */ #define ngx_memory_barrier() __asm (".volatile"); __asm (".nonvolatile") -#define ngx_cpu_pause() __asm ("pause") #else /* ( __GNUC__ || __INTEL_COMPILER ) */ |