summaryrefslogtreecommitdiff
path: root/src/precompiled.hpp
diff options
context:
space:
mode:
authorAndrew W. Nosenko <andrew.w.nosenko@gmail.com>2012-04-27 17:05:32 +0300
committerMartin Sustrik <sustrik@250bpm.com>2012-04-29 07:30:42 +0200
commit8aafb03dee4520ea62cd0cc0c78a9b958ec5ae18 (patch)
treec3120eb3294510d7f1ddef683b1e3d0c6aaae06f /src/precompiled.hpp
parentcdbaa67ff5fdb7cebab670e6f7906d9e81ae7f0a (diff)
atomic: revisit the atomic operation checks and their usage
* configure.ac: Check for working Solaris/NetBSD-style atomic.h independly on OS. Add check for GCC-style __sync_*() builtins. New defines: XS_ATOMIC_GCC_SYNC, XS_ATOMIC_SOLARIS. Removed define: XS_FORCE_MUTEXES. * src/atomic_counter.hpp: (atomic_counter_t::add): (atomic_counter_t::sub): * src/atomic_ptr.hpp: (atomic_ptr_t::xchg): (atomic_ptr_t::cas): Use result of these checks. Preference order: 1. GCC-style __sync_*() builtins 2. Inline asm (x86, x86-64, armv7a) 3. Solaris/NetBSD-style atomic.h, Windows-specific API 4. Fallback to mutex-based implementation
Diffstat (limited to 'src/precompiled.hpp')
0 files changed, 0 insertions, 0 deletions