diff options
author | Chris Robinson <[email protected]> | 2016-05-25 06:45:56 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2016-05-25 06:45:56 -0700 |
commit | 01f3e33df95c83efeb46a8f51670c99251d0cfdb (patch) | |
tree | 3c3fbec0ab5fa2b14dc78866ae9545f16ca25218 /include | |
parent | ea83c959caddca82affb5e87bf3d50b7511199d7 (diff) |
Remove a couple unneeded functions
Diffstat (limited to 'include')
-rw-r--r-- | include/atomic.h | 17 |
1 files changed, 0 insertions, 17 deletions
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)) |