Mercurial > hg > nginx-vendor-current
annotate src/os/unix/ngx_gcc_atomic_amd64.h @ 650:4d05413aebad NGINX_1_1_9
nginx 1.1.9
*) Change: now double quotes are encoded in an "echo" SSI-command
output.
Thanks to Zaur Abasmirzoev.
*) Feature: the "valid" parameter of the "resolver" directive. By
default TTL returned by a DNS server is used.
Thanks to Kirill A. Korinskiy.
*) Bugfix: nginx might hang after a worker process abnormal termination.
*) Bugfix: a segmentation fault might occur in a worker process if SNI
was used; the bug had appeared in 1.1.2.
*) Bugfix: in the "keepalive_disable" directive; the bug had appeared in
1.1.8.
Thanks to Alexander Usov.
*) Bugfix: SIGWINCH signal did not work after first binary upgrade; the
bug had appeared in 1.1.1.
*) Bugfix: backend responses with length not matching "Content-Length"
header line are no longer cached.
*) Bugfix: in the "scgi_param" directive, if complex parameters were
used.
*) Bugfix: in the "epoll" event method.
Thanks to Yichun Zhang.
*) Bugfix: in the ngx_http_flv_module.
Thanks to Piotr Sikora.
*) Bugfix: in the ngx_http_mp4_module.
*) Bugfix: IPv6 addresses are now handled properly in a request line and
in a "Host" request header line.
*) Bugfix: "add_header" and "expires" directives did not work if a
request was proxied and response status code was 206.
*) Bugfix: nginx could not be built on FreeBSD 10.
*) Bugfix: nginx could not be built on AIX.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 28 Nov 2011 00:00:00 +0400 |
parents | 052a7b1d40e5 |
children | d0f7a625f27c |
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") |