diff options
author | Richard Braun <rbraun@sceen.net> | 2013-06-09 16:33:26 +0200 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-08-26 16:29:35 +0200 |
commit | e8988e0845f2fe888df9bc94b2640a3fd82b6678 (patch) | |
tree | edb0e523543b30bdae3d62e42671dd1183855bc2 /kern/slab.h | |
parent | 6a0f92326547fd13dd0824973da6668c9eb7d201 (diff) |
kern/slab: rename constructor type
Diffstat (limited to 'kern/slab.h')
-rw-r--r-- | kern/slab.h | 12 |
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); |