X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_bitmap.c;h=f53ead165fe79b350b3f26da46f10a696a5d036b;hb=f460aeead9da6649a7a75e0f7df3149e62b48f15;hp=ff7a7a76021762c59f2961a85393792225f32f53;hpb=7ec6a6ee7f4a472587d49ddca3a9f5b587371fd5;p=palacios.git diff --git a/palacios/src/palacios/vmm_bitmap.c b/palacios/src/palacios/vmm_bitmap.c index ff7a7a7..f53ead1 100644 --- a/palacios/src/palacios/vmm_bitmap.c +++ b/palacios/src/palacios/vmm_bitmap.c @@ -30,7 +30,7 @@ int v3_bitmap_init(struct v3_bitmap * bitmap, int num_bits) { 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; } @@ -41,6 +41,7 @@ int v3_bitmap_init(struct v3_bitmap * bitmap, int num_bits) { void v3_bitmap_deinit(struct v3_bitmap * bitmap) { + v3_lock_deinit(&(bitmap->lock)); V3_Free(bitmap->bits); } @@ -60,7 +61,7 @@ int v3_bitmap_set(struct v3_bitmap * bitmap, int index) { 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; } @@ -84,7 +85,7 @@ int v3_bitmap_clear(struct v3_bitmap * bitmap, int index) { 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; } @@ -104,7 +105,7 @@ int v3_bitmap_check(struct v3_bitmap * bitmap, int index) { 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; } @@ -135,7 +136,7 @@ int v3_bitmap_count(struct v3_bitmap * bitmap) { 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; }