diff options
author | Chris Robinson <[email protected]> | 2014-05-06 19:07:40 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-05-06 19:07:40 -0700 |
commit | 1aff37114a930a6a7fab7067572133345398b542 (patch) | |
tree | a68d2638cdceb98ea55f55668aa922a5d5d78d57 /common | |
parent | fa12855d198d7701747539da05802519ce866030 (diff) |
Move atomic method definitions to a separate common source
Diffstat (limited to 'common')
-rw-r--r-- | common/atomic.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/common/atomic.c b/common/atomic.c new file mode 100644 index 00000000..02bbf066 --- /dev/null +++ b/common/atomic.c @@ -0,0 +1,12 @@ + +#include "config.h" + +#include "atomic.h" + + +extern inline RefCount IncrementRef(volatile RefCount *ptr); +extern inline RefCount DecrementRef(volatile 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); |