From 01f3e33df95c83efeb46a8f51670c99251d0cfdb Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 25 May 2016 06:45:56 -0700 Subject: Remove a couple unneeded functions --- include/atomic.h | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'include') diff --git a/include/atomic.h b/include/atomic.h index 8eb6820b..2a996625 100644 --- a/include/atomic.h +++ b/include/atomic.h @@ -305,23 +305,6 @@ inline uint DecrementRef(RefCount *ptr) { return ATOMIC_SUB(uint, ptr, 1)-1; } -/* NOTE: Not atomic! */ -inline int ExchangeInt(volatile int *ptr, int newval) -{ - int old = *ptr; - *ptr = newval; - return old; -} - -typedef void *volatile XchgPtr; -/* NOTE: Not atomic! */ -inline void *ExchangePtr(XchgPtr *ptr, void *newval) -{ - void *old = *ptr; - *ptr = newval; - return old; -} - /* 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)) -- cgit v1.2.3