aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-01-11 10:55:35 -0800
committerChris Robinson <[email protected]>2018-01-11 10:55:35 -0800
commit2873abcbc056ca2123382b2b1e08b8bd94d608a4 (patch)
treedfaaa84add6095c352acc1086b1a0c22899777cd /common
parente89c183231d26770f4c8ae80a8d05063c34cf0c9 (diff)
Fix up some types for MSVC
Diffstat (limited to 'common')
-rw-r--r--common/atomic.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/atomic.h b/common/atomic.h
index 2033476b..64b06cce 100644
--- a/common/atomic.h
+++ b/common/atomic.h
@@ -306,6 +306,7 @@ enum almemory_order {
} while(0)
int _al_invalid_atomic_size(); /* not defined */
+void *_al_invalid_atomic_ptr_size(); /* not defined */
#define ATOMIC_ADD(_val, _incr, _MO) \
((sizeof((_val)->value)==4) ? WRAP_ADDSUB(LONG, AtomicAdd32, &(_val)->value, (_incr)) : \
@@ -327,7 +328,7 @@ int _al_invalid_atomic_size(); /* not defined */
#define ATOMIC_EXCHANGE_PTR(_val, _newval, _MO) \
((sizeof((_val)->value)==sizeof(void*)) ? AtomicSwapPtr((void*volatile*)&(_val)->value, (_newval)) : \
- (void*)_al_invalid_atomic_size())
+ _al_invalid_atomic_ptr_size())
#define ATOMIC_COMPARE_EXCHANGE_PTR_STRONG(_val, _oldval, _newval, _MO1, _MO2)\
((sizeof((_val)->value)==sizeof(void*)) ? CompareAndSwapPtr((void*volatile*)&(_val)->value, (_newval), (void**)(_oldval)) : \
(bool)_al_invalid_atomic_size())