diff options
author | Matt Stancliff <matt@genges.com> | 2014-06-26 08:55:47 -0400 |
---|---|---|
committer | Matt Stancliff <matt@genges.com> | 2014-06-26 08:55:47 -0400 |
commit | a3e7a665ad62ab276b098c3c10460f111ea81200 (patch) | |
tree | 18396347815e4363dde1c32399ed2e033ef00acf /src/config.h | |
parent | a953c883815bada9365504940af52306d9a413ea (diff) | |
download | redis-a3e7a665ad62ab276b098c3c10460f111ea81200.tar.gz |
Allow __powerpc__ to define HAVE_ATOMIC too
From mailing list post https://groups.google.com/forum/#!topic/redis-db/D3k7KmJmYgM
In the file “config.h”, the definition HAVE_ATOMIC is used to indicate
if an architecture on which redis is implemented supports atomic
synchronization primitives. Powerpc supports atomic synchronization
primitives, however, it is not listed as one of the architectures
supported in config.h. This patch adds the __powerpc__ to the list of
architectures supporting these primitives. The improvement of redis
due to the atomic synchronization on powerpc is significant,
around 30% to 40%, over the default implementation using pthreads.
This proposal adds __powerpc__ to the list of architectures designated
to support atomic builtins.
Diffstat (limited to 'src/config.h')
-rw-r--r-- | src/config.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/config.h b/src/config.h index 8041f7ebe..1bc70a13e 100644 --- a/src/config.h +++ b/src/config.h @@ -185,7 +185,7 @@ void setproctitle(const char *fmt, ...); #error "Undefined or invalid BYTE_ORDER" #endif -#if (__i386 || __amd64) && __GNUC__ +#if (__i386 || __amd64 || __powerpc__) && __GNUC__ #define GNUC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) #if (GNUC_VERSION >= 40100) || defined(__clang__) #define HAVE_ATOMIC |