ObjFW  Diff

Differences From Artifact [428a9e720d]:

  • File src/OFAtomic_no_threads.h — part of check-in [1cdf56dc9e] at 2021-04-18 23:41:04 on branch new-naming-convention — of_memory_barrier -> OFMemoryBarrier (user: js size: 2986)

To Artifact [bc682f9d95]:

  • File src/OFAtomic_no_threads.h — part of check-in [a3dd145476] at 2021-04-25 11:26:14 on branch new-naming-convention — OFAtomic_no_threads.h: Fix typo (user: js size: 2989) [more...]

106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
static OF_INLINE uint32_t
OFAtomicInt32Xor(volatile uint32_t *_Nonnull p, uint32_t i)
{
	return (*p ^= i);
}

static OF_INLINE bool
OFAtomicIntCompareSwap(volatile int *_Nonnull p, int o, int n)
{
	if (*p == o) {
		*p = n;
		return true;
	}

	return false;







|







106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
static OF_INLINE uint32_t
OFAtomicInt32Xor(volatile uint32_t *_Nonnull p, uint32_t i)
{
	return (*p ^= i);
}

static OF_INLINE bool
OFAtomicIntCompareAndSwap(volatile int *_Nonnull p, int o, int n)
{
	if (*p == o) {
		*p = n;
		return true;
	}

	return false;