Problem with find_first_bit function and kin

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Alex Dubov
Date: Saturday, August 16, 2008 - 12:26 pm

It's well may be that I'm just missing something obvious.

It seems to me that find_first_bit/find_next_bit functions return their
offsets "base 1" - first set bit is "1" and last is "bitmap size". This
means that if only the last bit in the bitmap is set, the returned value
will be indistinguishable from no bits set situation. Moreover, bit
manipulation functions appear to use "base 0" bit addresses, adding to the
inconvenience.

Is this a desired behavior? And, if yes, how is one supposed to deal with last bit of the bitmap?



      
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Problem with find_first_bit function and kin, Alex Dubov, (Sat Aug 16, 12:26 pm)
Re: Problem with find_first_bit function and kin, Alexander van Heukelum, (Sun Aug 17, 4:58 am)
Re: Problem with find_first_bit function and kin, Alex Dubov, (Sun Aug 17, 7:22 pm)
Re: Problem with find_first_bit function and kin, Alexander van Heukelum, (Sun Aug 17, 11:53 pm)