diff options
author | des <des@FreeBSD.org> | 2008-10-23 15:53:51 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2008-10-23 15:53:51 +0000 |
commit | 66f807ed8b3634dc73d9f7526c484e43f094c0ee (patch) | |
tree | 21e792ce590e1bcf9b343890605a1b4c6a9016b3 /sys/kern/kern_mtxpool.c | |
parent | a779c60ce0a41cd14710a8a12cfa22955108b27a (diff) | |
download | FreeBSD-src-66f807ed8b3634dc73d9f7526c484e43f094c0ee.zip FreeBSD-src-66f807ed8b3634dc73d9f7526c484e43f094c0ee.tar.gz |
Retire the MALLOC and FREE macros. They are an abomination unto style(9).
MFC after: 3 months
Diffstat (limited to 'sys/kern/kern_mtxpool.c')
-rw-r--r-- | sys/kern/kern_mtxpool.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/kern/kern_mtxpool.c b/sys/kern/kern_mtxpool.c index aab28b6..6a98fea 100644 --- a/sys/kern/kern_mtxpool.c +++ b/sys/kern/kern_mtxpool.c @@ -146,8 +146,7 @@ mtx_pool_create(const char *mtx_name, int pool_size, int opts) mtx_name); pool_size = 128; } - MALLOC(pool, struct mtx_pool *, - sizeof (struct mtx_pool) + ((pool_size - 1) * sizeof (struct mtx)), + pool = malloc( sizeof (struct mtx_pool) + ((pool_size - 1) * sizeof (struct mtx)), M_MTXPOOL, M_WAITOK | M_ZERO); mtx_pool_initialize(pool, mtx_name, pool_size, opts); return pool; @@ -161,7 +160,7 @@ mtx_pool_destroy(struct mtx_pool **poolp) for (i = pool->mtx_pool_size - 1; i >= 0; --i) mtx_destroy(&pool->mtx_pool_ary[i]); - FREE(pool, M_MTXPOOL); + free(pool, M_MTXPOOL); *poolp = NULL; } @@ -208,7 +207,7 @@ mtx_pool_alloc(struct mtx_pool *pool) * memory allocator. The lockmgr subsystem is initialized by * SYSINIT(..., SI_SUB_LOCKMGR, ...). * - * We can't call MALLOC() to dynamically allocate the sleep pool + * We can't call malloc() to dynamically allocate the sleep pool * until after kmeminit() has been called, which is done by * SYSINIT(..., SI_SUB_KMEM, ...). */ |