Mercurial > hg > nginx
annotate auto/lib/libatomic/conf @ 4339:6f97afc238de
Cache: handling of cache files with long headers.
There are two possible situations which can lead to this: response was
cached with bigger proxy_buffer_size value (and nginx was restared since
then, i.e. shared memory zone content was lost), or due to the race in
the cache update code (see [1]) we've end up with fcn->body_start from
a different response stored in shared memory zone.
[1] http://mailman.nginx.org/pipermail/nginx-devel/2011-September/001287.html
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 12 Dec 2011 10:47:48 +0000 |
parents | 5d17022a1e88 |
children | d620f497c50f |
rev | line source |
---|---|
3363 | 1 |
2 # Copyright (C) Igor Sysoev | |
3 | |
4 | |
5 if [ $NGX_LIBATOMIC != YES ]; then | |
6 | |
7 have=NGX_HAVE_LIBATOMIC . auto/have | |
8 CORE_INCS="$CORE_INCS $NGX_LIBATOMIC/src" | |
9 LINK_DEPS="$LINK_DEPS $NGX_LIBATOMIC/src/libatomic_ops.a" | |
10 CORE_LIBS="$CORE_LIBS $NGX_LIBATOMIC/src/libatomic_ops.a" | |
11 | |
12 else | |
13 | |
14 ngx_feature="atomic_ops library" | |
15 ngx_feature_name=NGX_HAVE_LIBATOMIC | |
3366 | 16 ngx_feature_run=yes |
3378
5d17022a1e88
fix libatomic usage on arm, cris, hppa, m68k, and sparc platforms
Igor Sysoev <igor@sysoev.ru>
parents:
3366
diff
changeset
|
17 ngx_feature_incs="#define AO_REQUIRE_CAS |
5d17022a1e88
fix libatomic usage on arm, cris, hppa, m68k, and sparc platforms
Igor Sysoev <igor@sysoev.ru>
parents:
3366
diff
changeset
|
18 #include <atomic_ops.h>" |
3363 | 19 ngx_feature_path= |
20 ngx_feature_libs="-latomic_ops" | |
3366 | 21 ngx_feature_test="long n = 0; |
22 if (!AO_compare_and_swap(&n, 0, 1)) | |
23 return 1; | |
24 if (AO_fetch_and_add(&n, 1) != 1) | |
25 return 1; | |
26 if (n != 2) | |
27 return 1; | |
3363 | 28 AO_nop();" |
29 . auto/feature | |
30 | |
31 if [ $ngx_found = yes ]; then | |
32 CORE_LIBS="$CORE_LIBS $ngx_feature_libs" | |
33 else | |
34 | |
35 cat << END | |
36 | |
37 $0: error: libatomic_ops library was not found. | |
38 | |
39 END | |
40 exit 1 | |
41 fi | |
42 fi |