blob: 95b8f8353a06c63db0b19a68f67d8ebc07aea495 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#include "config.h"
#include "atomic.h"
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 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);
|