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-28 15:48:04 +0200 |
commit | 367abcb6571d15ac313cb0d191acbe61db8b38b6 (patch) | |
tree | 4207676c18fa304d996da9d42683ba335cf1ba51 /kern/slab.h | |
parent | fcb758c9e7237710fb63ac7c6bc16f5461b138ae (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); |