diff options
author | Mikael Ronstrom <mikael@mysql.com> | 2008-10-13 22:03:12 +0200 |
---|---|---|
committer | Mikael Ronstrom <mikael@mysql.com> | 2008-10-13 22:03:12 +0200 |
commit | e82dac8dab6215e71ae362b04415142622fb0995 (patch) | |
tree | 23d558b2aceb008e4d8a9df706ae32017760d722 /include/atomic | |
parent | 9daa56fd5ce3ccd33c32b5a505ac1d2b2c437460 (diff) | |
download | mariadb-git-e82dac8dab6215e71ae362b04415142622fb0995.tar.gz |
Performance patch: Mysql atomic patch
Diffstat (limited to 'include/atomic')
-rw-r--r-- | include/atomic/nolock.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/include/atomic/nolock.h b/include/atomic/nolock.h index 10ac17884b6..0e6c8089b84 100644 --- a/include/atomic/nolock.h +++ b/include/atomic/nolock.h @@ -28,11 +28,28 @@ #elif defined(_MSC_VER) #include "x86-msvc.h" #endif -#endif -#ifdef make_atomic_cas_body +#elif defined(HAVE_SOLARIS_ATOMIC) + +#include "solaris.h" + +#endif /* __i386__ || _M_IX86 || HAVE_GCC_ATOMIC_BUILTINS */ + +#if defined(make_atomic_cas_body) || defined(MY_ATOMICS_MADE) +/* + * We have atomics that require no locking + */ +#define MY_ATOMIC_NOLOCK +#ifdef __SUNPRO_C +/* + * Sun Studio 12 (and likely earlier) does not accept a typedef struct {} + */ +typedef char my_atomic_rwlock_t; +#else typedef struct { } my_atomic_rwlock_t; +#endif + #define my_atomic_rwlock_destroy(name) #define my_atomic_rwlock_init(name) #define my_atomic_rwlock_rdlock(name) |