From 367abcb6571d15ac313cb0d191acbe61db8b38b6 Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Sun, 9 Jun 2013 16:33:26 +0200 Subject: kern/slab: rename constructor type --- kern/slab.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'kern/slab.h') 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); -- cgit v1.2.3