Interface __BT

Inline function

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

#include <ARCH/BT.H>

static __finline__ int __BT(const void *ptr, int bit);

Description

Test a bit in a memory bitmap.

The exact layout of the bits in the bitmap is architecture-specific. The only specified fact is that bits with numbers up to number of bits in long int type (8 * sizeof(long)) map into one long int value in memory. Bits with numbers up to 2 * 8 * sizeof(long) map to the next long int and so on. Whether the mapping is big-endian or little-endian or from the most significant bit or from the least significant bit, depends on the architecture.

Arguments

Returns

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

See also

__BTS, __BTR, __BTC, __BS, __BR, __BC