Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
a9f50a38
Commit
a9f50a38
authored
Oct 17, 2016
by
antirez
Browse files
Better target MacOS on __atomic macros conditional compilation.
parent
ea95262d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/atomicvar.h
View file @
a9f50a38
...
@@ -51,8 +51,9 @@
...
@@ -51,8 +51,9 @@
#ifndef __ATOMIC_VAR_H
#ifndef __ATOMIC_VAR_H
#define __ATOMIC_VAR_H
#define __ATOMIC_VAR_H
#if defined(__ATOMIC_RELAXED) && (!defined(__clang__) || __apple_build_version__ > 4210057)
#if defined(__ATOMIC_RELAXED) && (!defined(__clang__) ||
!defined(__APPLE__) ||
__apple_build_version__ > 4210057)
/* Implementation using __atomic macros. */
/* Implementation using __atomic macros. */
#warning "Hey"
#define atomicIncr(var,count,mutex) __atomic_add_fetch(&var,(count),__ATOMIC_RELAXED)
#define atomicIncr(var,count,mutex) __atomic_add_fetch(&var,(count),__ATOMIC_RELAXED)
#define atomicDecr(var,count,mutex) __atomic_sub_fetch(&var,(count),__ATOMIC_RELAXED)
#define atomicDecr(var,count,mutex) __atomic_sub_fetch(&var,(count),__ATOMIC_RELAXED)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment