Interface __BTS

Inline function

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

#include <ARCH/BT.H>

static __finline__ int __BTS(void *ptr, int bit);

Description

Test a bit in a memory bitmap and then sets it. Atomicity of this operation is not specified — it should not be performed simultaneously by more threads or simultaneously by a code and an AST that interrupts it.

See the definition of __BT for description of the bitmap format in memory.

Arguments

Returns

0 if the bit was clear, 1 if the bit was set.

See also

__BT, __BTR, __BTC, __BS, __BR, __BC