Interface __PrefixOpSuffixCondition

Inline function

SpaceUser/kernel
ContextSync/async/rt-irq
May blockNo
SPLAny
Dynamic memoryNo

#include <ARCH/BITOPS.H>

static __finline__ int __PrefixOpSuffixCondition(type *ptr, type val);

Description

This family of inline functions perform an atomic logical operation on memory. The operation will be performed between val and ptr location and the result will be stored at ptr location. Additionally, they return a status returned by the operation.

Parts of function name — Op, Suffix, Prefix and Condition determine logical operation, data type, atomicity requirements and returned condition.

Arguments

Returns

If the condition was true after the operation, 1 is returned. Otherwise, 0 is returned.

See also

__PrefixOpSuffix __PrefixCMPXCHGSuffix