Interface __CMPXCHG64_AVAILABLE

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

Preprocessor macro expanding to an expression

#include <ARCH/BITOPS.H>

if (__CMPXCHG64_AVAILABLE) ...

Description

This macro returns non-zero if inline functions __CMPXCHG64 and __LOCK_CMPXCHG64 are available on a current CPU. If they are not available, they must not be called because that would cause an invalid instruction exception.

Returns

Zero, if 64-bit CMPXCHG is not available, otherwise non-zero.

See also

__PrefixCMPXCHGSuffix