Mercurial > hg > nginx-ranges
annotate src/os/unix/ngx_gcc_atomic_amd64.h @ 520:24b676623d4f NGINX_0_8_7
nginx 0.8.7
*) Change: minimum supported OpenSSL version is 0.9.7.
*) Change: the "ask" parameter of the "ssl_verify_client" directive was
changed to the "optional" parameter and now it checks a client
certificate if it was offered.
Thanks to Brice Figureau.
*) Feature: the $ssl_client_verify variable.
Thanks to Brice Figureau.
*) Feature: the "ssl_crl" directive.
Thanks to Brice Figureau.
*) Feature: the "proxy" parameter of the "geo" directive.
*) Feature: the "image_filter" directive supports variables for setting
size.
*) Bugfix: the $ssl_client_cert variable usage corrupted memory; the
bug had appeared in 0.7.7.
Thanks to Sergey Zhuravlev.
*) Bugfix: "proxy_pass_header" and "fastcgi_pass_header" directives did
not pass to a client the "X-Accel-Redirect", "X-Accel-Limit-Rate",
"X-Accel-Buffering", and "X-Accel-Charset" lines from backend
response header.
Thanks to Maxim Dounin.
*) Bugfix: in handling "Last-Modified" and "Accept-Ranges" backend
response header lines; the bug had appeared in 0.7.44.
Thanks to Maxim Dounin.
*) Bugfix: the "[alert] zero size buf" error if subrequest returns an
empty response; the bug had appeared in 0.8.5.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 27 Jul 2009 00:00:00 +0400 |
parents | 052a7b1d40e5 |
children |
rev | line source |
---|---|
110 | 1 |
2 /* | |
3 * Copyright (C) Igor Sysoev | |
4 */ | |
5 | |
6 | |
7 #if (NGX_SMP) | |
8 #define NGX_SMP_LOCK "lock;" | |
9 #else | |
10 #define NGX_SMP_LOCK | |
11 #endif | |
12 | |
13 | |
14 /* | |
15 * "cmpxchgq r, [m]": | |
16 * | |
17 * if (rax == [m]) { | |
18 * zf = 1; | |
19 * [m] = r; | |
20 * } else { | |
21 * zf = 0; | |
22 * rax = [m]; | |
23 * } | |
24 * | |
25 * | |
26 * The "r" is any register, %rax (%r0) - %r16. | |
274 | 27 * The "=a" and "a" are the %rax register. |
28 * Although we can return result in any register, we use "a" because it is | |
29 * used in cmpxchgq anyway. The result is actually in %al but not in $rax, | |
30 * however as the code is inlined gcc can test %al as well as %rax. | |
31 * | |
110 | 32 * The "cc" means that flags were changed. |
33 */ | |
34 | |
35 static ngx_inline ngx_atomic_uint_t | |
36 ngx_atomic_cmp_set(ngx_atomic_t *lock, ngx_atomic_uint_t old, | |
37 ngx_atomic_uint_t set) | |
126 | 38 { |
274 | 39 u_char res; |
110 | 40 |
41 __asm__ volatile ( | |
42 | |
43 NGX_SMP_LOCK | |
44 " cmpxchgq %3, %1; " | |
274 | 45 " sete %0; " |
110 | 46 |
47 : "=a" (res) : "m" (*lock), "a" (old), "r" (set) : "cc", "memory"); | |
48 | |
49 return res; | |
50 } | |
51 | |
52 | |
53 /* | |
54 * "xaddq r, [m]": | |
55 * | |
56 * temp = [m]; | |
57 * [m] += r; | |
58 * r = temp; | |
59 * | |
60 * | |
61 * The "+r" is any register, %rax (%r0) - %r16. | |
62 * The "cc" means that flags were changed. | |
63 */ | |
64 | |
65 static ngx_inline ngx_atomic_int_t | |
66 ngx_atomic_fetch_add(ngx_atomic_t *value, ngx_atomic_int_t add) | |
67 { | |
68 __asm__ volatile ( | |
69 | |
70 NGX_SMP_LOCK | |
71 " xaddq %0, %1; " | |
72 | |
274 | 73 : "+r" (add) : "m" (*value) : "cc", "memory"); |
110 | 74 |
75 return add; | |
76 } | |
112 | 77 |
78 | |
160 | 79 #define ngx_memory_barrier() __asm__ volatile ("" ::: "memory") |
80 | |
81 #define ngx_cpu_pause() __asm__ ("pause") |