commit 95d4017b221dc21551848fffb460f277eb4a5fe8
parent 9a9e3101e592116cf8b3d758cdefe4da583f9624
Author: sin <sin@2f30.org>
Date: Sun, 21 Jul 2013 20:38:47 +0100
Rename pool functions to be consistent with the hash functions
Diffstat:
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/include/pool.h b/include/pool.h
@@ -3,9 +3,9 @@
typedef int item_id;
-struct pool *pool_init(void);
-void pool_free(struct pool *pool);
-void *item_alloc(struct pool *pool, size_t n, item_id id);
-void item_free(struct pool *pool, item_id id);
+struct pool *init_pool(void);
+void free_pool(struct pool *pool);
+void *alloc_item(struct pool *pool, size_t n, item_id id);
+void free_item(struct pool *pool, item_id id);
#endif /* __POOL_H */
diff --git a/kernel/pool.c b/kernel/pool.c
@@ -25,7 +25,7 @@ static int ndebug = 0;
static spinlock_t pool_lock = SPINLOCK_INIT;
struct pool *
-pool_init(void)
+init_pool(void)
{
struct pool *pool;
@@ -38,7 +38,7 @@ pool_init(void)
}
void
-pool_free(struct pool *pool)
+free_pool(struct pool *pool)
{
struct item *item;
size_t i;
@@ -57,7 +57,7 @@ pool_free(struct pool *pool)
* If there is an unused item of sufficient size with the same
* `id' then it will be re-used. */
void *
-item_alloc(struct pool *pool, size_t n, item_id id)
+alloc_item(struct pool *pool, size_t n, item_id id)
{
struct item *tmp;
struct item *item;
@@ -104,7 +104,7 @@ item_alloc(struct pool *pool, size_t n, item_id id)
* free the underlying memory, it just marks those items
* as unused. */
void
-item_free(struct pool *pool, item_id id)
+free_item(struct pool *pool, item_id id)
{
struct item *item;
size_t i;