summaryrefslogtreecommitdiff
path: root/kern/slab.h
diff options
context:
space:
mode:
Diffstat (limited to 'kern/slab.h')
-rw-r--r--kern/slab.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/kern/slab.h b/kern/slab.h
index 9466f2d..52aa11b 100644
--- a/kern/slab.h
+++ b/kern/slab.h
@@ -62,12 +62,12 @@ struct kmem_cache;
*
* The pre-constructed state of an object is supposed to include only
* elements such as e.g. linked lists, locks, reference counters. Therefore
- * constructors are expected to 1) never fail and 2) not need any
- * user-provided data. The first constraint implies that object construction
- * never performs dynamic resource allocation, which also means there is no
- * need for destructors.
+ * constructors are expected to 1) never block, 2) never fail and 3) not
+ * need any user-provided data. As a result, object construction never
+ * performs dynamic resource allocation, which removes the need for
+ * destructors.
*/
-typedef void (*kmem_cache_ctor_t)(void *obj);
+typedef void (*kmem_ctor_fn_t)(void *);
/*
* Types for slab allocation/free functions.
@@ -104,7 +104,7 @@ extern vm_map_t kmem_map;
* (vm_kmem on the kernel map) is used for the allocation/free action.
*/
void kmem_cache_init(struct kmem_cache *cache, const char *name,
- size_t obj_size, size_t align, kmem_cache_ctor_t ctor,
+ size_t obj_size, size_t align, kmem_ctor_fn_t ctor,
kmem_slab_alloc_fn_t slab_alloc_fn,
kmem_slab_free_fn_t slab_free_fn, int flags);