Mercurial > hg > nginx-vendor-0-7
annotate src/os/unix/ngx_gcc_atomic_sparc64.h @ 366:babd3d9efb62 NGINX_0_6_27
nginx 0.6.27
*) Change: now by default the rtsig method is not built on
Linux 2.6.18+.
*) Change: now a request method is not changed while redirection to a
named location via an "error_page" directive.
*) Feature: the "resolver" and "resolver_timeout" directives in SMTP
proxy.
*) Feature: the "post_action" directive supports named locations.
*) Bugfix: a segmentation fault occurred in worker process, if a
request was redirected from proxy, FastCGI, or memcached location to
static named locations.
*) Bugfix: browsers did not repeat SSL handshake if there is no valid
client certificate in first handshake.
Thanks to Alexander V. Inyukhin.
*) Bugfix: if response code 495-497 was redirected via an "error_page"
directive without code change, then nginx tried to allocate too many
memory.
*) Bugfix: memory leak in long-lived non buffered connections.
*) Bugfix: memory leak in resolver.
*) Bugfix: a segmentation fault occurred in worker process, if a
request was redirected from proxy, FastCGI, or memcached location to
static named locations.
*) Bugfix: in the $proxy_host and $proxy_port variables caching.
Thanks to Sergey Bochenkov.
*) Bugfix: a "proxy_pass" directive with variables used incorrectly the
same port as in another "proxy_pass" directive with the same host
name and without variables.
Thanks to Sergey Bochenkov.
*) Bugfix: an alert "sendmsg() failed (9: Bad file descriptor)" on some
64-bit platforms while reconfiguration.
*) Bugfix: a segmentation fault occurred in worker process, if empty
stub block was used second time in SSI.
*) Bugfix: in copying URI part contained escaped symbols into arguments.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Wed, 12 Mar 2008 00:00:00 +0300 |
parents | 73e8476f9142 |
children |
rev | line source |
---|---|
110 | 1 |
2 /* | |
3 * Copyright (C) Igor Sysoev | |
4 */ | |
5 | |
6 | |
7 /* | |
8 * "casa [r1] 0x80, r2, r0" and | |
9 * "casxa [r1] 0x80, r2, r0" do the following: | |
10 * | |
11 * if ([r1] == r2) { | |
12 * swap(r0, [r1]); | |
13 * } else { | |
14 * r0 = [r1]; | |
15 * } | |
16 * | |
17 * so "r0 == r2" means that the operation was successfull. | |
18 * | |
19 * | |
20 * The "r" means the general register. | |
21 * The "+r" means the general register used for both input and output. | |
22 */ | |
23 | |
24 | |
25 #if (NGX_PTR_SIZE == 4) | |
26 #define NGX_CASA "casa" | |
27 #else | |
28 #define NGX_CASA "casxa" | |
29 #endif | |
30 | |
31 | |
32 static ngx_inline ngx_atomic_uint_t | |
33 ngx_atomic_cmp_set(ngx_atomic_t *lock, ngx_atomic_uint_t old, | |
34 ngx_atomic_uint_t set) | |
35 { | |
36 __asm__ volatile ( | |
37 | |
38 NGX_CASA " [%1] 0x80, %2, %0" | |
39 | |
40 : "+r" (set) : "r" (lock), "r" (old) : "memory"); | |
41 | |
42 return (set == old); | |
126 | 43 } |
110 | 44 |
45 | |
46 static ngx_inline ngx_atomic_int_t | |
47 ngx_atomic_fetch_add(ngx_atomic_t *value, ngx_atomic_int_t add) | |
48 { | |
49 ngx_atomic_uint_t old, res; | |
50 | |
51 old = *value; | |
52 | |
53 for ( ;; ) { | |
54 | |
55 res = old + add; | |
56 | |
57 __asm__ volatile ( | |
58 | |
59 NGX_CASA " [%1] 0x80, %2, %0" | |
60 | |
61 : "+r" (res) : "r" (value), "r" (old) : "memory"); | |
62 | |
63 if (res == old) { | |
64 return res; | |
65 } | |
66 | |
67 old = res; | |
68 } | |
69 } | |
112 | 70 |
71 | |
72 #if (NGX_SMP) | |
73 #define ngx_memory_barrier() \ | |
74 __asm__ volatile ( \ | |
75 "membar #LoadLoad | #LoadStore | #StoreStore | #StoreLoad" \ | |
76 ::: "memory") | |
77 #else | |
78 #define ngx_memory_barrier() __asm__ volatile ("" ::: "memory") | |
79 #endif | |
160 | 80 |
81 #define ngx_cpu_pause() |