1 /* Copyright 2001, 2002, 2003 by Hans Reiser, licensing governed by reiser4/README */
3 /* Fast pool allocation */
5 #ifndef __REISER4_POOL_H__
6 #define __REISER4_POOL_H__
8 #include <linux/types.h>
14 struct list_head free
;
15 struct list_head used
;
16 struct list_head extra
;
19 struct reiser4_pool_header
{
20 /* object is either on free or "used" lists */
21 struct list_head usage_linkage
;
22 struct list_head level_linkage
;
23 struct list_head extra_linkage
;
33 /* pool manipulation functions */
35 extern void reiser4_init_pool(struct reiser4_pool
* pool
, size_t obj_size
,
36 int num_of_objs
, char *data
);
37 extern void reiser4_done_pool(struct reiser4_pool
* pool
);
38 extern void reiser4_pool_free(struct reiser4_pool
* pool
,
39 struct reiser4_pool_header
* h
);
40 struct reiser4_pool_header
*reiser4_add_obj(struct reiser4_pool
* pool
,
41 struct list_head
* list
,
43 struct reiser4_pool_header
*reference
);
45 /* __REISER4_POOL_H__ */
50 c-indentation-style: "K&R"