fix atomic operations on sparc64 built by SunPro C

This commit is contained in:
Igor Sysoev 2007-04-27 14:36:28 +00:00
parent 359561d6cc
commit dc566e4bd6

View File

@ -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_cmp_set(ngx_atomic_t *lock, ngx_atomic_uint_t old,
ngx_atomic_uint_t set) ngx_atomic_uint_t set)
{ {
NGX_CASA(set, old, lock); set = NGX_CASA(set, old, lock);
return (set == old); return (set == old);
} }
@ -41,7 +41,7 @@ ngx_atomic_fetch_add(ngx_atomic_t *value, ngx_atomic_int_t add)
res = old + add; res = old + add;
NGX_CASA(res, old, value); res = NGX_CASA(res, old, value);
if (res == old) { if (res == old) {
return res; return res;