-/*! @function OSCompareAndSwap
- @abstract Compare and swap operation, performed atomically with respect to all devices that participate in the coherency architecture of the platform.
- @discussion The OSCompareAndSwap function compares the value at the specified address with oldVal. The value of newValue is written to the address only if oldValue and the value at the address are equal. OSCompareAndSwap returns true if newValue is written to the address; otherwise, it returns false.
-
- This function guarantees atomicity only with main system memory. It is specifically unsuitable for use on noncacheable memory such as that in devices; this function cannot guarantee atomicity, for example, on memory mapped from a PCI device.
- @param oldValue The value to compare at address.
- @param newValue The value to write to address if oldValue compares true.
- @param address The 4-byte aligned address of the data to update atomically.
- @result true if newValue was written to the address. */
-
-extern Boolean OSCompareAndSwap( UInt32 oldValue, UInt32 newValue, UInt32 * address );
-
-/*! @function OSAddAtomic
- @abstract 32-bit add operation, performed atomically with respect to all devices that participate in the coherency architecture of the platform.
- @discussion The OSAddAtomic function adds the specified amount to the value at the specified address and returns the result.
-
- This function guarantees atomicity only with main system memory. It is specifically unsuitable for use on noncacheable memory such as that in devices; this function cannot guarantee atomicity, for example, on memory mapped from a PCI device.
- @param amount The amount to add.
- @param address The 4-byte aligned address of the value to update atomically.
- @result The value before the addition */
-
-extern SInt32 OSAddAtomic(SInt32 amount, SInt32 * address);
-
-/*! @function OSAddAtomic16
- @abstract 16-bit add operation, performed atomically with respect to all devices that participate in the coherency architecture of the platform.
- @discussion The OSAddAtomic16 function adds the specified amount to the value at the specified address and returns the result.
-
- This function guarantees atomicity only with main system memory. It is specifically unsuitable for use on noncacheable memory such as that in devices; this function cannot guarantee atomicity, for example, on memory mapped from a PCI device.
- @param amount The amount to add.
- @param address The 2-byte aligned address of the value to update atomically.
- @result The value before the addition */
-
-extern SInt16 OSAddAtomic16(SInt32 amount, SInt16 * address);
-
-/*! @function OSAddAtomic8
- @abstract 8-bit add operation, performed atomically with respect to all devices that participate in the coherency architecture of the platform.
- @discussion The OSAddAtomic8 function adds the specified amount to the value at the specified address and returns the result.
-
- This function guarantees atomicity only with main system memory. It is specifically unsuitable for use on noncacheable memory such as that in devices; this function cannot guarantee atomicity, for example, on memory mapped from a PCI device.
- @param amount The amount to add.
- @param address The address of the value to update atomically.
- @result The value before the addition */
-
-extern SInt8 OSAddAtomic8(SInt32 amount, SInt8 * address);
-
-/*! @function OSIncrementAtomic
- @abstract 32-bit increment operation, performed atomically with respect to all devices that participate in the coherency architecture of the platform.
- @discussion The OSIncrementAtomic function increments the value at the specified address by one and returns the value as it was before the change.
-
- This function guarantees atomicity only with main system memory. It is specifically unsuitable for use on noncacheable memory such as that in devices; this function cannot guarantee atomicity, for example, on memory mapped from a PCI device.
- @param address The 4-byte aligned address of the value to update atomically.
- @result The value before the increment. */
-
-extern SInt32 OSIncrementAtomic(SInt32 * address);
-
-/*! @function OSIncrementAtomic16
- @abstract 16-bit increment operation, performed atomically with respect to all devices that participate in the coherency architecture of the platform.
- @discussion The OSIncrementAtomic16 function increments the value at the specified address by one and returns the value as it was before the change.
-
- This function guarantees atomicity only with main system memory. It is specifically unsuitable for use on noncacheable memory such as that in devices; this function cannot guarantee atomicity, for example, on memory mapped from a PCI device.
- @param address The 2-byte aligned address of the value to update atomically.
- @result The value before the increment. */
-
-extern SInt16 OSIncrementAtomic16(SInt16 * address);
-
-/*! @function OSIncrementAtomic8
- @abstract 8-bit increment operation, performed atomically with respect to all devices that participate in the coherency architecture of the platform.
- @discussion The OSIncrementAtomic8 function increments the value at the specified address by one and returns the value as it was before the change.
-
- This function guarantees atomicity only with main system memory. It is specifically unsuitable for use on noncacheable memory such as that in devices; this function cannot guarantee atomicity, for example, on memory mapped from a PCI device.
- @param address The address of the value to update atomically.
- @result The value before the increment. */
-
-extern SInt8 OSIncrementAtomic8(SInt8 * address);
-
-/*! @function OSDecrementAtomic
- @abstract 32-bit decrement operation, performed atomically with respect to all devices that participate in the coherency architecture of the platform.
- @discussion The OSDecrementAtomic function decrements the value at the specified address by one and returns the value as it was before the change.
-
- This function guarantees atomicity only with main system memory. It is specifically unsuitable for use on noncacheable memory such as that in devices; this function cannot guarantee atomicity, for example, on memory mapped from a PCI device.
- @param address The 4-byte aligned address of the value to update atomically.
- @result The value before the decrement. */
-
-extern SInt32 OSDecrementAtomic(SInt32 * address);
-
-/*! @function OSDecrementAtomic16
- @abstract 16-bit decrement operation, performed atomically with respect to all devices that participate in the coherency architecture of the platform.
- @discussion The OSDecrementAtomic16 function decrements the value at the specified address by one and returns the value as it was before the change.
-
- This function guarantees atomicity only with main system memory. It is specifically unsuitable for use on noncacheable memory such as that in devices; this function cannot guarantee atomicity, for example, on memory mapped from a PCI device.
- @param address The 2-byte aligned address of the value to update atomically.
- @result The value before the decrement. */
-
-extern SInt16 OSDecrementAtomic16(SInt16 * address);
-
-/*! @function OSDecrementAtomic8
- @abstract 8-bit decrement operation, performed atomically with respect to all devices that participate in the coherency architecture of the platform.
- @discussion The OSDecrementAtomic8 function decrements the value at the specified address by one and returns the value as it was before the change.
-
- This function guarantees atomicity only with main system memory. It is specifically unsuitable for use on noncacheable memory such as that in devices; this function cannot guarantee atomicity, for example, on memory mapped from a PCI device.
- @param address The address of the value to update atomically.
- @result The value before the decrement. */
-
-extern SInt8 OSDecrementAtomic8(SInt8 * address);
-
-/*! @function OSBitAndAtomic
- @abstract 32-bit logical and operation, performed atomically with respect to all devices that participate in the coherency architecture of the platform.
- @discussion The OSBitAndAtomic function logically ands the bits of the specified mask into the value at the specified address and returns the result.
-
- This function guarantees atomicity only with main system memory. It is specifically unsuitable for use on noncacheable memory such as that in devices; this function cannot guarantee atomicity, for example, on memory mapped from a PCI device.
- @param mask The mask to logically and with the value.
- @param address The 4-byte aligned address of the value to update atomically.
- @result The value before the bitwise operation */
-
-extern UInt32 OSBitAndAtomic(UInt32 mask, UInt32 * address);
-
-/*! @function OSBitAndAtomic16
- @abstract 16-bit logical and operation, performed atomically with respect to all devices that participate in the coherency architecture of the platform.
- @discussion The OSBitAndAtomic16 function logically ands the bits of the specified mask into the value at the specified address and returns the result.
-
- This function guarantees atomicity only with main system memory. It is specifically unsuitable for use on noncacheable memory such as that in devices; this function cannot guarantee atomicity, for example, on memory mapped from a PCI device.
- @param mask The mask to logically and with the value.
- @param address The 2-byte aligned address of the value to update atomically.
- @result The value before the bitwise operation. */
-
-extern UInt16 OSBitAndAtomic16(UInt32 mask, UInt16 * address);
-
-/*! @function OSBitAndAtomic8
- @abstract 8-bit logical and operation, performed atomically with respect to all devices that participate in the coherency architecture of the platform.
- @discussion The OSBitAndAtomic8 function logically ands the bits of the specified mask into the value at the specified address and returns the result.
-
- This function guarantees atomicity only with main system memory. It is specifically unsuitable for use on noncacheable memory such as that in devices; this function cannot guarantee atomicity, for example, on memory mapped from a PCI device.
- @param mask The mask to logically and with the value.
- @param address The address of the value to update atomically.
- @result The value before the bitwise operation. */
-
-extern UInt8 OSBitAndAtomic8(UInt32 mask, UInt8 * address);
-
-/*! @function OSBitOrAtomic
- @abstract 32-bit logical or operation, performed atomically with respect to all devices that participate in the coherency architecture of the platform.
- @discussion The OSBitOrAtomic function logically ors the bits of the specified mask into the value at the specified address and returns the result.
-
- This function guarantees atomicity only with main system memory. It is specifically unsuitable for use on noncacheable memory such as that in devices; this function cannot guarantee atomicity, for example, on memory mapped from a PCI device.
- @param mask The mask to logically or with the value.
- @param address The 4-byte aligned address of the value to update atomically.
- @result The value before the bitwise operation. */
-
-extern UInt32 OSBitOrAtomic(UInt32 mask, UInt32 * address);
-
-/*! @function OSBitOrAtomic16
- @abstract 16-bit logical or operation, performed atomically with respect to all devices that participate in the coherency architecture of the platform.
- @discussion The OSBitOrAtomic16 function logically ors the bits of the specified mask into the value at the specified address and returns the result.