From a480c3510f98c491879d42ff7106287f07d03e2f Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Wed, 9 Mar 2016 16:53:46 +0100 Subject: lib: Add bitmap test This adds a test for the bitmap. During the testing I also removed some bugs that were present in the bitmap implementation. --- include/ouroboros/bitmap.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/include/ouroboros/bitmap.h b/include/ouroboros/bitmap.h index 6296e2e0..c109f3e8 100644 --- a/include/ouroboros/bitmap.h +++ b/include/ouroboros/bitmap.h @@ -1,7 +1,7 @@ /* * Ouroboros - Copyright (C) 2016 * - * RINA bitmap implementation - wraps around bitmap from Linux kernel + * Bitmap implementation * * Sander Vrijders * Francesco Salvestrini @@ -28,14 +28,14 @@ #include #include -struct rbmp; +struct bmp; -struct rbmp * rbmp_create(size_t bits, ssize_t offset); -int rbmp_destroy(struct rbmp * b); +struct bmp * bmp_create(size_t bits, ssize_t offset); +int bmp_destroy(struct bmp * b); -ssize_t rbmp_allocate(struct rbmp * instance); -int rbmp_release(struct rbmp * instance, - ssize_t id); -bool rbmp_is_id_ok(struct rbmp * b, ssize_t id); +ssize_t bmp_allocate(struct bmp * instance); +int bmp_release(struct bmp * instance, + ssize_t id); +bool bmp_is_id_valid(struct bmp * b, ssize_t id); #endif -- cgit v1.2.3