Mercurial > hg > nginx
comparison auto/lib/libatomic/conf @ 3366:b44a7159c5fb
atomic operations test-run
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 27 Nov 2009 22:00:39 +0000 |
parents | b4aa418af6ef |
children | 5d17022a1e88 |
comparison
equal
deleted
inserted
replaced
3365:d518c65ff0d4 | 3366:b44a7159c5fb |
---|---|
11 | 11 |
12 else | 12 else |
13 | 13 |
14 ngx_feature="atomic_ops library" | 14 ngx_feature="atomic_ops library" |
15 ngx_feature_name=NGX_HAVE_LIBATOMIC | 15 ngx_feature_name=NGX_HAVE_LIBATOMIC |
16 ngx_feature_run=no | 16 ngx_feature_run=yes |
17 ngx_feature_incs="#include <atomic_ops.h>" | 17 ngx_feature_incs="#include <atomic_ops.h>" |
18 ngx_feature_path= | 18 ngx_feature_path= |
19 ngx_feature_libs="-latomic_ops" | 19 ngx_feature_libs="-latomic_ops" |
20 ngx_feature_test="AO_t *n; | 20 ngx_feature_test="long n = 0; |
21 AO_compare_and_swap(n, 0, 1); | 21 if (!AO_compare_and_swap(&n, 0, 1)) |
22 AO_fetch_and_add(n, 1); | 22 return 1; |
23 if (AO_fetch_and_add(&n, 1) != 1) | |
24 return 1; | |
25 if (n != 2) | |
26 return 1; | |
23 AO_nop();" | 27 AO_nop();" |
24 | |
25 . auto/feature | 28 . auto/feature |
26 | 29 |
27 if [ $ngx_found = yes ]; then | 30 if [ $ngx_found = yes ]; then |
28 CORE_LIBS="$CORE_LIBS $ngx_feature_libs" | 31 CORE_LIBS="$CORE_LIBS $ngx_feature_libs" |
29 else | 32 else |