diff options
author | Chris Robinson <[email protected]> | 2014-07-31 04:44:39 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-07-31 04:44:39 -0700 |
commit | cdfc5a4d31d17e156736bb8bdcaf93ea505237ac (patch) | |
tree | 99ce13db3a16e2d092868c13736d24ed4b74bae2 | |
parent | ce046d2f03a349d15a5e092d64287df33a79117b (diff) |
Remove an unused function
-rw-r--r-- | common/atomic.c | 1 | ||||
-rw-r--r-- | include/atomic.h | 8 |
2 files changed, 0 insertions, 9 deletions
diff --git a/common/atomic.c b/common/atomic.c index 90654628..d78fc60d 100644 --- a/common/atomic.c +++ b/common/atomic.c @@ -11,5 +11,4 @@ extern inline uint DecrementRef(RefCount *ptr); extern inline int ExchangeInt(volatile int *ptr, int newval); extern inline void *ExchangePtr(XchgPtr *ptr, void *newval); -extern inline int CompExchangeInt(volatile int *ptr, int oldval, int newval); extern inline void *CompExchangePtr(XchgPtr *ptr, void *oldval, void *newval); diff --git a/include/atomic.h b/include/atomic.h index ab7b73be..bf00b813 100644 --- a/include/atomic.h +++ b/include/atomic.h @@ -19,8 +19,6 @@ inline int ExchangeInt(volatile int *ptr, int newval) { return atomic_exchange(ptr, newval); } inline void *ExchangePtr(XchgPtr *ptr, void *newval) { return atomic_exchange(ptr, newval); } -inline int CompExchangeInt(volatile int *ptr, int oldval, int newval) -{ atomic_compare_exchange_strong(ptr, &oldval, newval); return oldval; } inline void *CompExchangePtr(XchgPtr *ptr, void *oldval, void *newval) { atomic_compare_exchange_strong(ptr, &oldval, newval); return oldval; } @@ -49,8 +47,6 @@ inline int ExchangeInt(volatile int *ptr, int newval) { return __sync_lock_test_and_set(ptr, newval); } inline void *ExchangePtr(XchgPtr *ptr, void *newval) { return __sync_lock_test_and_set(ptr, newval); } -inline int CompExchangeInt(volatile int *ptr, int oldval, int newval) -{ return __sync_val_compare_and_swap(ptr, oldval, newval); } inline void *CompExchangePtr(XchgPtr *ptr, void *oldval, void *newval) { return __sync_val_compare_and_swap(ptr, oldval, newval); } @@ -126,8 +122,6 @@ inline void *CompExchangePtr(XchgPtr *ptr, void *oldval, void *newval) inline int ExchangeInt(volatile int *dest, int newval) { int ret; WRAP_XCHG("l", ret, dest, newval); return ret; } -inline int CompExchangeInt(volatile int *dest, int oldval, int newval) -{ int ret; WRAP_CMPXCHG("l", ret, dest, oldval, newval); return ret; } #ifdef __i386__ inline void *ExchangePtr(XchgPtr *dest, void *newval) @@ -246,8 +240,6 @@ inline bool CompareAndSwap64(volatile LONGLONG *dest, LONGLONG newval, LONGLONG inline int ExchangeInt(volatile int *ptr, int newval) { return WRAP_XCHG(int,AtomicSwap32,ptr,newval); } -inline int CompExchangeInt(volatile int *ptr, int oldval, int newval) -{ WRAP_CMPXCHG(int,CompareAndSwap32,ptr,newval,&oldval); return oldval; } #ifdef _WIN64 inline void *ExchangePtr(XchgPtr *ptr, void *newval) |