diff options
author | Igor Sysoev <igor@sysoev.ru> | 2004-09-22 20:18:21 +0400 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2004-09-22 20:18:21 +0400 |
commit | 85080d09ad785214243d60474d25894fcf24e27d (patch) | |
tree | 0f3198ccf0603955dfc33dec639d5ec115214b19 /src/os/win32 | |
parent | f1602634ad817eb03bf7873641ed3c2bfa7223f6 (diff) |
nginx-0.0.11-2004-09-22-20:18:21 import
Diffstat (limited to 'src/os/win32')
-rw-r--r-- | src/os/win32/ngx_atomic.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/os/win32/ngx_atomic.h b/src/os/win32/ngx_atomic.h index fcc3ff1ee..9d75fabd5 100644 --- a/src/os/win32/ngx_atomic.h +++ b/src/os/win32/ngx_atomic.h @@ -6,17 +6,23 @@ #include <ngx_core.h> +#define NGX_HAVE_ATOMIC_OPS 1 + + #define ngx_atomic_inc(p) InterlockedIncrement((long *) p) -#define ngx_atomic_dec(p) InterlockedDecrement((long *) p) #if defined( __WATCOMC__ ) || defined( __BORLANDC__ ) +/* the new SDK headers */ + #define ngx_atomic_cmp_set(lock, old, set) \ (InterlockedCompareExchange((long *) lock, set, old) == old) #else +/* the old MS VC6.0SP2 SDK headers */ + #define ngx_atomic_cmp_set(lock, old, set) \ (InterlockedCompareExchange((void **) lock, (void *) set, (void *) old) \ == (void *) old) |