1 /* Copyright 2001, 2002, 2003 by Hans Reiser, licensing governed by
4 /* Fast pool allocation */
6 #ifndef __REISER4_POOL_H__
7 #define __REISER4_POOL_H__
9 #include <linux/types.h>
15 struct list_head free
;
16 struct list_head used
;
17 struct list_head extra
;
20 struct reiser4_pool_header
{
21 /* object is either on free or "used" lists */
22 struct list_head usage_linkage
;
23 struct list_head level_linkage
;
24 struct list_head extra_linkage
;
34 /* pool manipulation functions */
36 extern void reiser4_init_pool(struct reiser4_pool
*pool
, size_t obj_size
,
37 int num_of_objs
, char *data
);
38 extern void reiser4_done_pool(struct reiser4_pool
*pool
);
39 extern void reiser4_pool_free(struct reiser4_pool
*pool
,
40 struct reiser4_pool_header
*h
);
41 struct reiser4_pool_header
*reiser4_add_obj(struct reiser4_pool
*pool
,
42 struct list_head
*list
,
44 struct reiser4_pool_header
*reference
);
46 /* __REISER4_POOL_H__ */
51 c-indentation-style: "K&R"