Mercurial > hg > nginx
diff src/os/unix/ngx_sunpro_atomic_sparc64.h @ 1186:c114defa4518
fix atomic operations on sparc64 built by SunPro C
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 27 Apr 2007 14:36:28 +0000 |
parents | 3f8a2132b93d |
children | d620f497c50f |
line wrap: on
line diff
--- a/src/os/unix/ngx_sunpro_atomic_sparc64.h +++ b/src/os/unix/ngx_sunpro_atomic_sparc64.h @@ -24,7 +24,7 @@ static ngx_inline ngx_atomic_uint_t ngx_atomic_cmp_set(ngx_atomic_t *lock, ngx_atomic_uint_t old, ngx_atomic_uint_t set) { - NGX_CASA(set, old, lock); + set = NGX_CASA(set, old, lock); return (set == old); } @@ -41,7 +41,7 @@ ngx_atomic_fetch_add(ngx_atomic_t *value res = old + add; - NGX_CASA(res, old, value); + res = NGX_CASA(res, old, value); if (res == old) { return res;