fix compile error with use of ATOMIC_FLAG_INIT

closes #60
This commit is contained in:
Andrew Kelley 2016-04-22 10:33:44 -07:00
parent e8b908243d
commit 658c4f60c5

View file

@ -37,7 +37,7 @@ struct SoundIoAtomicFlag {
#define SOUNDIO_ATOMIC_EXCHANGE(a, value) (a.x.exchange(value)) #define SOUNDIO_ATOMIC_EXCHANGE(a, value) (a.x.exchange(value))
#define SOUNDIO_ATOMIC_FLAG_TEST_AND_SET(a) (a.x.test_and_set()) #define SOUNDIO_ATOMIC_FLAG_TEST_AND_SET(a) (a.x.test_and_set())
#define SOUNDIO_ATOMIC_FLAG_CLEAR(a) (a.x.clear()) #define SOUNDIO_ATOMIC_FLAG_CLEAR(a) (a.x.clear())
#define SOUNDIO_ATOMIC_FLAG_INIT {ATOMIC_FLAG_INIT} #define SOUNDIO_ATOMIC_FLAG_INIT ATOMIC_FLAG_INIT
#else #else
@ -65,7 +65,7 @@ struct SoundIoAtomicFlag {
#define SOUNDIO_ATOMIC_EXCHANGE(a, value) atomic_exchange(&a.x, value) #define SOUNDIO_ATOMIC_EXCHANGE(a, value) atomic_exchange(&a.x, value)
#define SOUNDIO_ATOMIC_FLAG_TEST_AND_SET(a) atomic_flag_test_and_set(&a.x) #define SOUNDIO_ATOMIC_FLAG_TEST_AND_SET(a) atomic_flag_test_and_set(&a.x)
#define SOUNDIO_ATOMIC_FLAG_CLEAR(a) atomic_flag_clear(&a.x) #define SOUNDIO_ATOMIC_FLAG_CLEAR(a) atomic_flag_clear(&a.x)
#define SOUNDIO_ATOMIC_FLAG_INIT {ATOMIC_FLAG_INIT} #define SOUNDIO_ATOMIC_FLAG_INIT ATOMIC_FLAG_INIT
#endif #endif