if (bitmap->bits == NULL) {
- PrintError("Could not allocate bitmap of %d bits\n", num_bits);
+ PrintError(VM_NONE, VCORE_NONE, "Could not allocate bitmap of %d bits\n", num_bits);
return -1;
}
void v3_bitmap_deinit(struct v3_bitmap * bitmap) {
+ v3_lock_deinit(&(bitmap->lock));
V3_Free(bitmap->bits);
}
uint32_t flags = 0;
if (index > (bitmap->num_bits - 1)) {
- PrintError("Index out of bitmap range: (pos = %d) (num_bits = %d)\n",
+ PrintError(VM_NONE, VCORE_NONE, "Index out of bitmap range: (pos = %d) (num_bits = %d)\n",
index, bitmap->num_bits);
return -1;
}
uint32_t flags = 0;
if (index > (bitmap->num_bits - 1)) {
- PrintError("Index out of bitmap range: (pos = %d) (num_bits = %d)\n",
+ PrintError(VM_NONE, VCORE_NONE, "Index out of bitmap range: (pos = %d) (num_bits = %d)\n",
index, bitmap->num_bits);
return -1;
}
int minor = index % 8;
if (index > (bitmap->num_bits - 1)) {
- PrintError("Index out of bitmap range: (pos = %d) (num_bits = %d)\n",
+ PrintError(VM_NONE, VCORE_NONE, "Index out of bitmap range: (pos = %d) (num_bits = %d)\n",
index, bitmap->num_bits);
return -1;
}
int v3_bitmap_copy(struct v3_bitmap * dst, struct v3_bitmap * src) {
if (src->num_bits != dst->num_bits) {
- PrintError("src and dst must be the same size.\n");
+ PrintError(VM_NONE, VCORE_NONE, "src and dst must be the same size.\n");
return -1;
}