diff options
author | Chris Robinson <[email protected]> | 2016-11-22 03:00:16 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2016-11-22 03:00:16 -0800 |
commit | c6189717580453b03cc70f0647a215f3f5f886fe (patch) | |
tree | ceda65d18733e34c59d74c6fe430e2d78d9ff8a8 /include | |
parent | 01babb69d25fd23bde0fdf5ed525bb82934ce6fd (diff) |
Remove the non-atomic COMPARE_EXCHANGE macro
Diffstat (limited to 'include')
-rw-r--r-- | include/atomic.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/include/atomic.h b/include/atomic.h index 7d743286..3a662f8e 100644 --- a/include/atomic.h +++ b/include/atomic.h @@ -332,11 +332,6 @@ inline uint DecrementRef(RefCount *ptr) { return ATOMIC_SUB(ptr, 1)-1; } -/* This is *NOT* atomic, but is a handy utility macro to compare-and-swap non- - * atomic variables. */ -#define COMPARE_EXCHANGE(_val, _oldval, _newval) ((*(_val) == *(_oldval)) ? ((*(_val)=(_newval)),true) : ((*(_oldval)=*(_val)),false)) - - #ifdef __cplusplus } #endif |