Mercurial > hg > nginx
diff src/os/unix/ngx_atomic.h @ 571:458b6c3fea65 release-0.3.7
nginx-0.3.7-RELEASE import
*) Feature: the "access_log" supports the "buffer=" parameter.
*) Bugfix: nginx could not be built on platforms different from i386,
amd64, sparc, and ppc; the bug had appeared in 0.3.2.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 27 Oct 2005 15:46:13 +0000 |
parents | 9c2f3ed7a247 |
children | 3f8a2132b93d |
line wrap: on
line diff
--- a/src/os/unix/ngx_atomic.h +++ b/src/os/unix/ngx_atomic.h @@ -154,7 +154,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) { - if (*lock == old { + if (*lock == old) { *lock = set; return 1; } @@ -174,9 +174,10 @@ ngx_atomic_fetch_add(ngx_atomic_t *value return old; } +#define ngx_memory_barrier() + #endif - void ngx_spinlock(ngx_atomic_t *lock, ngx_uint_t spin); #define ngx_trylock(lock) (*(lock) == 0 && ngx_atomic_cmp_set(lock, 0, 1))