cc1d63ba4b8b078c988839679aee4edde7bd3790
[openafs.git] / src / mcas / osi_mcas_obj_cache.h
1
2 #ifndef __OSI_MCAS_OBJ_CACHE_H
3 #define __OSI_MCAS_OBJ_CACHE_H
4
5 #include "../mcas/portable_defns.h"
6 #include "../mcas/ptst.h"
7 #include "../mcas/gc.h"
8
9 typedef int osi_mcas_obj_cache_t;
10
11 /* Create a new MCAS GC pool, and return its identifier, which
12  * follows future calls */
13 void osi_mcas_obj_cache_create(osi_mcas_obj_cache_t * gc_id, size_t size,
14         char *tag);     /* alignment? */
15
16 /* Allocate an object from the pool identified by
17  * gc_id */
18 void *osi_mcas_obj_cache_alloc(osi_mcas_obj_cache_t gc_id);
19
20 /* Release object obj to its GC pool, identified by
21  * gc_id */
22 void osi_mcas_obj_cache_free(osi_mcas_obj_cache_t gc_id, void *obj);
23
24 /* Terminate an MCAS GC pool */
25 void osi_mcas_obj_cache_destroy(osi_mcas_obj_cache_t gc_id);
26
27 #endif /* __OSI_MCAS_OBJ_CACHE_H */