From c6189717580453b03cc70f0647a215f3f5f886fe Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 22 Nov 2016 03:00:16 -0800 Subject: Remove the non-atomic COMPARE_EXCHANGE macro --- include/atomic.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'include') 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 -- cgit v1.2.3