Boolean
OSCompareAndSwap8(UInt8 oldValue, UInt8 newValue, volatile UInt8 *address)
{
- return os_atomic_cmpxchg(address, oldValue, newValue, acq_rel);
+ return (Boolean)os_atomic_cmpxchg(address, oldValue, newValue, acq_rel);
}
#undef OSCompareAndSwap16
Boolean
OSCompareAndSwap16(UInt16 oldValue, UInt16 newValue, volatile UInt16 *address)
{
- return os_atomic_cmpxchg(address, oldValue, newValue, acq_rel);
+ return (Boolean)os_atomic_cmpxchg(address, oldValue, newValue, acq_rel);
}
#undef OSCompareAndSwap
OSCompareAndSwap(UInt32 oldValue, UInt32 newValue, volatile UInt32 *address)
{
ALIGN_TEST(address, UInt32);
- return os_atomic_cmpxchg(address, oldValue, newValue, acq_rel);
+ return (Boolean)os_atomic_cmpxchg(address, oldValue, newValue, acq_rel);
}
#undef OSCompareAndSwap64
_Atomic UInt64 *aligned_addr = (_Atomic UInt64 *)(uintptr_t)address;
ALIGN_TEST(address, UInt64);
- return os_atomic_cmpxchg(aligned_addr, oldValue, newValue, acq_rel);
+ return (Boolean)os_atomic_cmpxchg(aligned_addr, oldValue, newValue, acq_rel);
}
#undef OSCompareAndSwapPtr
Boolean
OSCompareAndSwapPtr(void *oldValue, void *newValue, void * volatile *address)
{
- return os_atomic_cmpxchg(address, oldValue, newValue, acq_rel);
+ return (Boolean)os_atomic_cmpxchg(address, oldValue, newValue, acq_rel);
}
SInt8
OSAddAtomic8(SInt32 amount, volatile SInt8 *address)
{
- return os_atomic_add_orig(address, amount, relaxed);
+ return os_atomic_add_orig(address, (SInt8)amount, relaxed);
}
SInt16
OSAddAtomic16(SInt32 amount, volatile SInt16 *address)
{
- return os_atomic_add_orig(address, amount, relaxed);
+ return os_atomic_add_orig(address, (SInt16)amount, relaxed);
}
#undef OSAddAtomic
UInt8
OSBitAndAtomic8(UInt32 mask, volatile UInt8 * value)
{
- return os_atomic_and_orig(value, mask, relaxed);
+ return os_atomic_and_orig(value, (UInt8)mask, relaxed);
}
UInt8
OSBitOrAtomic8(UInt32 mask, volatile UInt8 * value)
{
- return os_atomic_or_orig(value, mask, relaxed);
+ return os_atomic_or_orig(value, (UInt8)mask, relaxed);
}
UInt8
OSBitXorAtomic8(UInt32 mask, volatile UInt8 * value)
{
- return os_atomic_xor_orig(value, mask, relaxed);
+ return os_atomic_xor_orig(value, (UInt8)mask, relaxed);
}
SInt16
UInt16
OSBitAndAtomic16(UInt32 mask, volatile UInt16 * value)
{
- return os_atomic_and_orig(value, mask, relaxed);
+ return os_atomic_and_orig(value, (UInt16)mask, relaxed);
}
UInt16
OSBitOrAtomic16(UInt32 mask, volatile UInt16 * value)
{
- return os_atomic_or_orig(value, mask, relaxed);
+ return os_atomic_or_orig(value, (UInt16)mask, relaxed);
}
UInt16
OSBitXorAtomic16(UInt32 mask, volatile UInt16 * value)
{
- return os_atomic_xor_orig(value, mask, relaxed);
+ return os_atomic_xor_orig(value, (UInt16)mask, relaxed);
}