Klaus Demo nginx / ea2f6af
test Darwin 8 atomic(3) Igor Sysoev 15 years ago
2 changed file(s) with 13 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
4141 CORE_INCS="$UNIX_INCS"
4242 CORE_DEPS="$UNIX_DEPS $POSIX_DEPS"
4343 CORE_SRCS="$UNIX_SRCS"
44
45 ngx_feature="atomic(3)"
46 ngx_feature_name=NGX_DARWIN_ATOMIC
47 ngx_feature_run=no
48 ngx_feature_incs="#include <libkern/OSAtomic.h>"
49 ngx_feature_path=
50 ngx_feature_libs=
51 ngx_feature_test="int32_t lock, n;
52 n = OSAtomicCompareAndSwap32Barrier(0, 1, lock)"
53 . auto/feature
4454 ;;
4555
4656 HP-UX:*)
1111 #include <ngx_core.h>
1212
1313
14 #if (NGX_DARWIN)
14 #if (NGX_DARWIN_ATOMIC)
1515
1616 /*
17 * use MacOSX atomic(3) and barrier(3) operations
18 * optimized at run time for UP and SMP
17 * use Darwin 8 atomic(3) and barrier(3) operations
18 * optimized at run-time for UP and SMP
1919 */
2020
2121 #include <libkern/OSAtomic.h>