xref: /haiku/src/tests/add-ons/kernel/file_systems/bfs/btree/cache.h (revision c90684742e7361651849be4116d0e5de3a817194)
1 #ifndef CACHE_H
2 #define CACHE_H
3 /* cache - emulation for the B+Tree torture test
4 **
5 ** Initial version by Axel Dörfler, axeld@pinc-software.de
6 ** This file may be used under the terms of the OpenBeOS License.
7 */
8 
9 
10 #include <SupportDefs.h>
11 
12 class BFile;
13 
14 
15 extern void init_cache(BFile *file, int32 blockSize);
16 extern void shutdown_cache(BFile *file, int32 blockSize);
17 
18 extern int cached_write(BFile *file, off_t bnum, const void *data,off_t num_blocks, int bsize);
19 extern void *get_block(BFile *file, off_t bnum, int bsize);
20 extern int release_block(BFile *file, off_t bnum);
21 
22 #endif	/* CACHE_H */
23