diff options
author | Ruslan Ermilov <ru@nginx.com> | 2016-03-30 11:52:16 +0300 |
---|---|---|
committer | Ruslan Ermilov <ru@nginx.com> | 2016-03-30 11:52:16 +0300 |
commit | 7ad57da59821294255610545b2b5ce07e74124a5 (patch) | |
tree | 91bb44ad5950b703d0f49a8744f0b9b08cf29f11 /src/os/unix/ngx_atomic.h | |
parent | dfbc51a8cc850154fe8839408f32c7e322f5cdf0 (diff) | |
download | nginx-7ad57da59821294255610545b2b5ce07e74124a5.tar.gz nginx-7ad57da59821294255610545b2b5ce07e74124a5.zip |
Style.
Diffstat (limited to 'src/os/unix/ngx_atomic.h')
-rw-r--r-- | src/os/unix/ngx_atomic.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/os/unix/ngx_atomic.h b/src/os/unix/ngx_atomic.h index 417cd86ff..74b8b7f84 100644 --- a/src/os/unix/ngx_atomic.h +++ b/src/os/unix/ngx_atomic.h @@ -276,26 +276,26 @@ typedef volatile ngx_atomic_uint_t ngx_atomic_t; 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_atomic_uint_t set) { - if (*lock == old) { - *lock = set; - return 1; - } + if (*lock == old) { + *lock = set; + return 1; + } - return 0; + return 0; } static ngx_inline ngx_atomic_int_t ngx_atomic_fetch_add(ngx_atomic_t *value, ngx_atomic_int_t add) { - ngx_atomic_int_t old; + ngx_atomic_int_t old; - old = *value; - *value += add; + old = *value; + *value += add; - return old; + return old; } #define ngx_memory_barrier() |