]> git.kaiwu.me - nginx.git/commitdiff
fix atomic operations on sparc64 built by SunPro C
authorIgor Sysoev <igor@sysoev.ru>
Fri, 27 Apr 2007 14:36:28 +0000 (14:36 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Fri, 27 Apr 2007 14:36:28 +0000 (14:36 +0000)
src/os/unix/ngx_sunpro_atomic_sparc64.h

index db852114bdb819cd96a7efa307bacdb4ce4c9632..b12603009eef1d1671f9fe5bf20468809a147c47 100644 (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_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, ngx_atomic_int_t add)
 
         res = old + add;
 
-        NGX_CASA(res, old, value);
+        res = NGX_CASA(res, old, value);
 
         if (res == old) {
             return res;