xref: /haiku/src/add-ons/kernel/file_systems/websearchfs/vnidpool.h (revision ed24eb5ff12640d052171c6a7feba37fab8a75d1)
1 /*
2  * Copyright 2004-2008, François Revol, <revol@free.fr>.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef _VNIDPOOL_H
6 #define _VNIDPOOL_H
7 
8 #include "websearchfs.h"
9 
10 typedef struct vnidpool {
11 	lock lock;
12 	ino_t nextvnid;
13 	uint32 *bitmap;
14 	size_t bmsize;
15 } vnidpool;
16 
17 status_t vnidpool_alloc(struct vnidpool **pool, size_t size);
18 status_t vnidpool_free(struct vnidpool *pool);
19 status_t vnidpool_get(struct vnidpool *pool, ino_t *vnid);
20 status_t vnidpool_put(struct vnidpool *pool, ino_t vnid);
21 
22 #endif /* _VNIDPOOL_H */
23