src/kernel/bitmanip.h
// Count the trailing zero bits on the right
// Find the position of the lowest bit set

Count the trailing zero bits on the right
Find the position of the lowest bit set
Count the trailing zero bits on the right Find the position of the lowest bit set
inline static uint32 LowestBitSet(uint32 value)
    {
      uint32 count = 0;
      value = (value ^ (value - 1)) >> 1;  
      for (count = 0; value; count++)
      {
        value >>= 1;
      }
      return count;
    }
inline static uint32 LowestBitSet ( uint32 value ) { uint32 count = 0 ; value = ( value ^ ( value - 1 ) ) >> 1 ; for ( count = 0 ; value ; count ++ ) { value >>= 1 ; } return count ; }
Count the trailing zero bits on the right
Find the position of the lowest bit set
Count the trailing zero bits on the right Find the position of the lowest bit set
// Set value's trailing 0s to 1s and zero rest
