OSTestAndClearAtomic

Syntax

#include <cafe/os.h>

BOOL OSTestAndClearAtomic(volatile OSAtomicVar* ptr, u32 bitnum);

Parameters

ptr Pointer to data to test and clear atomically.
bitnum Bit number to test and clear atomically.

Return Values

TRUE if the previous bit of the value contained in ptr was set. FALSE if the previous bit of the value contained in ptr was not set (cleared).

Description

OSTestAndClearAtomic clears the bit for the value contained at address ptr. This is useful if the value needs to be atomically manipulated by multiple processors.

It does not act as a memory barrier.

Do Not Call From

None.

See Also

OSAddAtomic
OSAndAtomic
OSCompareAndSwapAtomic
OSCompareAndSwapAtomicEx
OSDecAtomic
OSIncAtomic
OSOrAtomic
OSSwapAtomic
OSTestAndSetAtomic
OSXorAtomic

Revision History

2013/05/08 Automated cleanup pass.
2012/07/30 Cleanup Pass.
2010/08/30 Initial version.


CONFIDENTIAL