BitMap currently provides get_next_{one,zero}_offset and get_next_one_offset_aligned_right. This is very nearly the last lingering use of "offset" terminology that we've been eliminating.
Also, gen-zgc needs functions that find the last bit / search from the end, and the return value is awkward for that with the current naming.
Propose to replace get_next_{one,zero}_offset with find_first_{set,clear}_bit, with the intent of later adding find_last_{set,clear}_bit. All have the same not-found value of the end of the specified range.
Also, gen-zgc needs functions that find the last bit / search from the end, and the return value is awkward for that with the current naming.
Propose to replace get_next_{one,zero}_offset with find_first_{set,clear}_bit, with the intent of later adding find_last_{set,clear}_bit. All have the same not-found value of the end of the specified range.