diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2007-07-22 08:47:45 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2007-07-22 08:47:45 +0000 |
| commit | 64bb1e34d24f805a278da05e55efd449be76e57f (patch) | |
| tree | bf4555e728d672cf86c58f163eb7e1e8f3b0bdb1 /src/os/unix | |
| parent | fbd3b2d727af9cc308d0a0c82812d5181f9a477e (diff) | |
| download | nginx-64bb1e34d24f805a278da05e55efd449be76e57f.tar.gz nginx-64bb1e34d24f805a278da05e55efd449be76e57f.tar.bz2 | |
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Sun Studio related fixes
Diffstat (limited to 'src/os/unix')
| -rw-r--r-- | src/os/unix/ngx_atomic.h | 20 | ||||
| -rw-r--r-- | src/os/unix/ngx_sunpro_amd64.il | 7 | ||||
| -rw-r--r-- | src/os/unix/ngx_sunpro_x86.il | 7 |
3 files changed, 31 insertions, 3 deletions
diff --git a/src/os/unix/ngx_atomic.h b/src/os/unix/ngx_atomic.h index c0734e12e..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 ) */ @@ -136,7 +150,7 @@ ngx_atomic_fetch_add(ngx_atomic_t *value, ngx_atomic_int_t add); #endif -#elif ( __sparc__ || __sparcv9 ) +#elif ( __sparc__ || __sparc || __sparcv9 ) #if (NGX_PTR_SIZE == 8) diff --git a/src/os/unix/ngx_sunpro_amd64.il b/src/os/unix/ngx_sunpro_amd64.il index 0cd94b023..c26e6f717 100644 --- a/src/os/unix/ngx_sunpro_amd64.il +++ b/src/os/unix/ngx_sunpro_amd64.il @@ -28,3 +28,10 @@ lock xaddq %rax, (%rdi) .end + + +/ ngx_cpu_pause() + + .inline ngx_cpu_pause,0 + pause + .end diff --git a/src/os/unix/ngx_sunpro_x86.il b/src/os/unix/ngx_sunpro_x86.il index a16568ac8..b82a2267b 100644 --- a/src/os/unix/ngx_sunpro_x86.il +++ b/src/os/unix/ngx_sunpro_x86.il @@ -29,3 +29,10 @@ lock xaddl %eax, (%ecx) .end + + +/ ngx_cpu_pause() + + .inline ngx_cpu_pause,0 + pause + .end |
