48
48
/** The type used by all the other atomic operations. */
49
#if APR_VERSION_AT_LEAST(1, 0, 0)
50
49
#define svn_atomic_t apr_uint32_t
52
#define svn_atomic_t apr_atomic_t
55
51
/** Atomically read an #svn_atomic_t from memory. */
56
#if APR_VERSION_AT_LEAST(1, 0, 0)
57
52
#define svn_atomic_read(mem) apr_atomic_read32((mem))
59
#define svn_atomic_read(mem) apr_atomic_read((mem))
62
54
/** Atomically set an #svn_atomic_t in memory. */
63
#if APR_VERSION_AT_LEAST(1, 0, 0)
64
55
#define svn_atomic_set(mem, val) apr_atomic_set32((mem), (val))
66
#define svn_atomic_set(mem, val) apr_atomic_set((mem), (val))
69
57
/** Atomically increment an #svn_atomic_t. */
70
#if APR_VERSION_AT_LEAST(1, 0, 0)
71
58
#define svn_atomic_inc(mem) apr_atomic_inc32(mem)
73
#define svn_atomic_inc(mem) apr_atomic_inc(mem)
76
60
/** Atomically decrement an #svn_atomic_t. */
77
#if APR_VERSION_AT_LEAST(1, 0, 0)
78
61
#define svn_atomic_dec(mem) apr_atomic_dec32(mem)
80
#define svn_atomic_dec(mem) apr_atomic_dec(mem)
84
64
* Atomic compare-and-swap.
91
71
* that on some platforms, the CAS function is implemented in a
92
72
* way that is incompatible with the other atomic operations.
94
#if APR_VERSION_AT_LEAST(1, 0, 0)
95
74
#define svn_atomic_cas(mem, with, cmp) \
96
75
apr_atomic_cas32((mem), (with), (cmp))
98
#define svn_atomic_cas(mem, with, cmp) \
99
apr_atomic_cas((mem), (with), (cmp))