template <typename T = size_t>
class Bitmap
Defined at line 15 of file ../../zircon/system/ulib/bitmap/include/bitmap/bitmap.h
An abstract bitmap.
Public Methods
zx_status_t Find (bool is_set, T bitoff, T bitmax, T run_len, T * out)
Finds a run of |run_len| |is_set| bits, between |bitoff| and |bitmax|.
Sets |out| with the start of the run, or |bitmax| if it is
not found in the provided range.
If the run is not found, "ZX_ERR_NO_RESOURCES" is returned.
bool Get (T bitoff, T bitmax, T * first_unset)
Returns true if all the bits in [*bitoff*, *bitmax*) are set. Afterwards,
*first_unset* will be set to the lesser of bitmax and the index of the
first unset bit after *bitoff*.
void ~Bitmap<T> ()
Defined at line 17 of file ../../zircon/system/ulib/bitmap/include/bitmap/bitmap.h
bool GetOne (T bitoff)
Returns true in the bit at bitoff is set.
Defined at line 26 of file ../../zircon/system/ulib/bitmap/include/bitmap/bitmap.h
bool Get (T bitoff, T bitmax)
Defined at line 32 of file ../../zircon/system/ulib/bitmap/include/bitmap/bitmap.h
zx_status_t Set (T bitoff, T bitmax)
Sets all bits in the range [*bitoff*, *bitmax*). Only fails on
allocation error or if bitmax
<
bitoff.
zx_status_t Clear (T bitoff, T bitmax)
Clears all bits in the range [*bitoff*, *bitmax*). Only fails on
allocation error or if bitmax
<
bitoff.
void ClearAll ()
Clear all bits in the bitmap.
zx_status_t SetOne (T bitoff)
Sets the bit at bitoff. Only fails on allocation error.
Defined at line 35 of file ../../zircon/system/ulib/bitmap/include/bitmap/bitmap.h
zx_status_t ClearOne (T bitoff)
Clears the bit at bitoff. Only fails on allocation error.
Defined at line 42 of file ../../zircon/system/ulib/bitmap/include/bitmap/bitmap.h