Embedded Artistry Framework
Embedded Systems C++ Framework
Functions
flsll.c File Reference
#include <strings.h>
Include dependency graph for flsll.c:

Functions

int flsll (long long mask)
 Finds the last (most significant) bit set in the given mask. More...
 

Function Documentation

◆ flsll()

int flsll ( long long  mask)

Finds the last (most significant) bit set in the given mask.

Finds the last (most significant) bit set in the given (long long) mask and return the index of that bit.

Bits are numbered starting at 1, the least significant bit.

Parameters
maskThe bit mask
Returns
The index of the bit if mask is not zero, 0 otherwise.