aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-05-27 15:48:15 -0700
committerChris Robinson <[email protected]>2014-05-27 15:48:15 -0700
commit73614f228eda86e9dc074540989a11a4fd7fb9e9 (patch)
treef06a99caeba3556be3275ad69f4abcd2e4f1d2ff /common
parentfd62868c17ce1b7c0a68c6615c0392b09c3661cd (diff)
Add methods to exchange and compare-exchange RefCount values
Diffstat (limited to 'common')
-rw-r--r--common/atomic.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/atomic.c b/common/atomic.c
index 95b8f835..634587e4 100644
--- a/common/atomic.c
+++ b/common/atomic.c
@@ -8,6 +8,8 @@ extern inline void InitRef(volatile RefCount *ptr, uint value);
extern inline uint ReadRef(volatile RefCount *ptr);
extern inline uint IncrementRef(volatile RefCount *ptr);
extern inline uint DecrementRef(volatile RefCount *ptr);
+extern inline uint ExchangeRef(volatile RefCount *ptr, uint newval);
+extern inline uint CompExchangeRef(volatile RefCount *ptr, uint oldval, uint newval);
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);