b02e200d799b3452cbaff7db29b158bef3133670
[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);      /* alignment? */
14
15 /* Allocate an object from the pool identified by
16  * gc_id */
17 void *osi_mcas_obj_cache_alloc(osi_mcas_obj_cache_t gc_id);
18
19 /* Release object obj to its GC pool, identified by
20  * gc_id */
21 void osi_mcas_obj_cache_free(osi_mcas_obj_cache_t gc_id, void *obj);
22
23 /* Terminate an MCAS GC pool */
24 void osi_mcas_obj_cache_destroy(osi_mcas_obj_cache_t gc_id);
25
26 #endif /* __OSI_MCAS_OBJ_CACHE_H */