| #ifndef _NGX_ATOMIC_H_INCLUDED_ |
| #define _NGX_ATOMIC_H_INCLUDED_ |
| typedef uint32_t ngx_atomic_t; |
| #define NGX_SMP_LOCK "lock" |
| static ngx_inline uint32_t ngx_atomic_inc(ngx_atomic_t *value) |
| ": "=a" (old) : "m" (*value)); |
| static ngx_inline uint32_t ngx_atomic_dec(ngx_atomic_t *value) |
| ": "=a" (old) : "m" (*value)); |
| static ngx_inline uint32_t ngx_atomic_cmp_set(ngx_atomic_t *lock, |
| ": "=a" (res) : "m" (*lock), "a" (old), "q" (set)); |
| typedef uint32_t ngx_atomic_t; |
| #define ngx_atomic_inc(x) x++; |
| #define ngx_atomic_dec(x) x--; |
| #define ngx_atomic_cmp_set(lock, old, set) 1; |
| #endif /* _NGX_ATOMIC_H_INCLUDED_ */ |