fed up with those stupid warnings
[mmotm.git] / fs / reiser4 / pool.h
blobd0f91fe09ff5461a0c89a4c1783c092c02235856
1 /* Copyright 2001, 2002, 2003 by Hans Reiser, licensing governed by
2 * reiser4/README */
4 /* Fast pool allocation */
6 #ifndef __REISER4_POOL_H__
7 #define __REISER4_POOL_H__
9 #include <linux/types.h>
11 struct reiser4_pool {
12 size_t obj_size;
13 int objs;
14 char *data;
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;
27 typedef enum {
28 POOLO_BEFORE,
29 POOLO_AFTER,
30 POOLO_LAST,
31 POOLO_FIRST
32 } pool_ordering;
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,
43 pool_ordering order,
44 struct reiser4_pool_header *reference);
46 /* __REISER4_POOL_H__ */
47 #endif
49 /* Make Linus happy.
50 Local variables:
51 c-indentation-style: "K&R"
52 mode-name: "LC"
53 c-basic-offset: 8
54 tab-width: 8
55 fill-column: 120
56 End: