diff options
author | Premysl Hruby <dfenze@gmail.com> | 2012-02-26 09:59:32 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2012-02-26 11:45:52 +0100 |
commit | 80ff1fc6d0e3da53ae7bea0354216a38f7303971 (patch) | |
tree | e5681dfc6b03aa1106527c6a65ea330f7b7ed03a /src/config.h | |
parent | 59132e42125c43299c428e86f9107493e173883e (diff) | |
download | redis-80ff1fc6d0e3da53ae7bea0354216a38f7303971.tar.gz |
use gcc sync builtins for memory counter when possible
Diffstat (limited to 'src/config.h')
-rw-r--r-- | src/config.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/config.h b/src/config.h index 323a3ddd1..2bf0f9340 100644 --- a/src/config.h +++ b/src/config.h @@ -96,4 +96,13 @@ #error "Undefined or invalid BYTE_ORDER" #endif +#if (__i386 || __amd64) && __GNUC__ + #include <features.h> + + #if __GNUC_PREREQ(4,1) + #define HAVE_ATOMIC + #endif +#endif + + #endif |