]> Git Repo - qemu.git/blobdiff - include/qemu/hbitmap.h
machine: Eliminate QEMUMachine and qemu_register_machine()
[qemu.git] / include / qemu / hbitmap.h
index 550d7ce2c397ca1a61cff78ce690edfe54e2f6a4..bb94a00c5f4381a1b192a2f242887f289117609a 100644 (file)
@@ -64,6 +64,29 @@ struct HBitmapIter {
  */
 HBitmap *hbitmap_alloc(uint64_t size, int granularity);
 
+/**
+ * hbitmap_truncate:
+ * @hb: The bitmap to change the size of.
+ * @size: The number of elements to change the bitmap to accommodate.
+ *
+ * truncate or grow an existing bitmap to accommodate a new number of elements.
+ * This may invalidate existing HBitmapIterators.
+ */
+void hbitmap_truncate(HBitmap *hb, uint64_t size);
+
+/**
+ * hbitmap_merge:
+ * @a: The bitmap to store the result in.
+ * @b: The bitmap to merge into @a.
+ * @return true if the merge was successful,
+ *         false if it was not attempted.
+ *
+ * Merge two bitmaps together.
+ * A := A (BITOR) B.
+ * B is left unmodified.
+ */
+bool hbitmap_merge(HBitmap *a, const HBitmap *b);
+
 /**
  * hbitmap_empty:
  * @hb: HBitmap to operate on.
@@ -108,6 +131,14 @@ void hbitmap_set(HBitmap *hb, uint64_t start, uint64_t count);
  */
 void hbitmap_reset(HBitmap *hb, uint64_t start, uint64_t count);
 
+/**
+ * hbitmap_reset_all:
+ * @hb: HBitmap to operate on.
+ *
+ * Reset all bits in an HBitmap.
+ */
+void hbitmap_reset_all(HBitmap *hb);
+
 /**
  * hbitmap_get:
  * @hb: HBitmap to operate on.
This page took 0.022276 seconds and 4 git commands to generate.