mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-21 09:02:00 -06:00
hbitmap: Add @advance param to hbitmap_iter_next()
This new parameter allows the caller to just query the next dirty position without moving the iterator. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Message-id: 20180613181823.13618-8-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
parent
ec9f10fe06
commit
a33fbb4f8b
5 changed files with 26 additions and 19 deletions
|
@ -324,11 +324,14 @@ void hbitmap_free_meta(HBitmap *hb);
|
|||
/**
|
||||
* hbitmap_iter_next:
|
||||
* @hbi: HBitmapIter to operate on.
|
||||
* @advance: If true, advance the iterator. Otherwise, the next call
|
||||
* of this function will return the same result (if that
|
||||
* position is still dirty).
|
||||
*
|
||||
* Return the next bit that is set in @hbi's associated HBitmap,
|
||||
* or -1 if all remaining bits are zero.
|
||||
*/
|
||||
int64_t hbitmap_iter_next(HBitmapIter *hbi);
|
||||
int64_t hbitmap_iter_next(HBitmapIter *hbi, bool advance);
|
||||
|
||||
/**
|
||||
* hbitmap_iter_next_word:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue