Hi,
To find the first set bit in a memory region at or after a given offset, there currently exists
find_next_bit in the Linux Kernel API:
Code:
int find_next_bit (const unsigned long * addr, int size, int offset);
The
implementation (in Linux) of find_next_bit currently returns "size" should the "offset" argument is greater than or equal to "size".
Suppose one goes about building a
Code:
int find_prev_bit (const unsigned long * addr, int size, int offset);
to find the first set bit in a memory region
at or before a given offset, what would be the most sensible behavior should "offset" is greater than or equal to "size"?
Regards,
Hanson