Mercurial > hg > nginx
view src/os/unix/ngx_sunpro_atomic_sparc64.h @ 605:5dac8c7fb71b release-0.3.24
nginx-0.3.24-RELEASE import
*) Workaround: for bug in FreeBSD kqueue.
*) Bugfix: now a response generated by the "post_action" directive is
not transferred to a client.
*) Bugfix: the memory leaks were occurring if many log files were used.
*) Bugfix: the first "proxy_redirect" directive was working inside one
location.
*) Bugfix: on 64-bit platforms segmentation fault may occurred on start
if the many names were used in the "server_name" directives; the bug
had appeared in 0.3.18.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 01 Feb 2006 18:22:15 +0000 |
parents | 4d9ea73a627a |
children | 3f8a2132b93d |
line wrap: on
line source
/* * Copyright (C) Igor Sysoev */ #if (NGX_PTR_SIZE == 4) #define NGX_CASA ngx_casa #else #define NGX_CASA ngx_casxa #endif ngx_atomic_uint_t ngx_casa(ngx_atomic_uint_t set, ngx_atomic_uint_t old, ngx_atomic_t *lock); ngx_atomic_uint_t ngx_casxa(ngx_atomic_uint_t set, ngx_atomic_uint_t old, ngx_atomic_t *lock); /* the code in src/os/unix/ngx_sunpro_sparc64.il */ 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); return (set == old); } static ngx_inline ngx_atomic_int_t ngx_atomic_fetch_add(ngx_atomic_t *value, ngx_atomic_int_t add) { ngx_atomic_uint_t old, res; old = *value; for ( ;; ) { res = old + add; NGX_CASA(res, old, value); if (res == old) { return res; } old = res; } } #define ngx_memory_barrier() \ __asm (".volatile"); \ __asm ("membar #LoadLoad | #LoadStore | #StoreStore | #StoreLoad"); \ __asm (".nonvolatile")