Interface __BSCAN

Inline function

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

#include <ARCH/BT.H>

static __finline__ int __BSCAN(unsigned long val);

Description

This function uses the same bitmap format as __BT and similar __B* functions, but it operates only on one long int. It doesn't operate in memory.

This function scans for a non-zero bit in an unsigned long int and returns its index. The index may be passed to __BVS, __BVR or __BVC functions.

The order in which bits are scanned is unspecified.

Arguments

Returns

An index of a bit. The mapping of bits to unsigned long int is architecture-specific.

Implementation note

On IA-32 this function is equivalent to __BSF. On other architectures, it may be implemented differently.

See also

__BVS, __BVR, __BVC, __BT, __BTS, __BTR, __BTC, __BS, __BR, __BC