1*25c4a958SIngo Weinhold /* 2*25c4a958SIngo Weinhold Copyright 1999-2001, Be Incorporated. All Rights Reserved. 3*25c4a958SIngo Weinhold This file may be used under the terms of the Be Sample Code License. 4*25c4a958SIngo Weinhold */ 5*25c4a958SIngo Weinhold 6*25c4a958SIngo Weinhold #ifndef USERLAND_FS_BEOS_FS_CACHE_H 7*25c4a958SIngo Weinhold #define USERLAND_FS_BEOS_FS_CACHE_H 8*25c4a958SIngo Weinhold 9*25c4a958SIngo Weinhold #include <BeBuild.h> 10*25c4a958SIngo Weinhold 11*25c4a958SIngo Weinhold #ifndef _IMPEXP_KERNEL 12*25c4a958SIngo Weinhold #define _IMPEXP_KERNEL 13*25c4a958SIngo Weinhold #endif 14*25c4a958SIngo Weinhold 15*25c4a958SIngo Weinhold #ifdef __cplusplus 16*25c4a958SIngo Weinhold extern "C" { 17*25c4a958SIngo Weinhold #endif 18*25c4a958SIngo Weinhold 19*25c4a958SIngo Weinhold extern _IMPEXP_KERNEL int beos_init_block_cache(int max_blocks, int flags); 20*25c4a958SIngo Weinhold extern _IMPEXP_KERNEL void beos_shutdown_block_cache(void); 21*25c4a958SIngo Weinhold 22*25c4a958SIngo Weinhold extern _IMPEXP_KERNEL void beos_force_cache_flush(int dev, 23*25c4a958SIngo Weinhold int prefer_log_blocks); 24*25c4a958SIngo Weinhold extern _IMPEXP_KERNEL int beos_flush_blocks(int dev, off_t bnum, int nblocks); 25*25c4a958SIngo Weinhold extern _IMPEXP_KERNEL int beos_flush_device(int dev, int warn_locked); 26*25c4a958SIngo Weinhold 27*25c4a958SIngo Weinhold extern _IMPEXP_KERNEL int beos_init_cache_for_device(int fd, 28*25c4a958SIngo Weinhold off_t max_blocks); 29*25c4a958SIngo Weinhold extern _IMPEXP_KERNEL int beos_remove_cached_device_blocks(int dev, 30*25c4a958SIngo Weinhold int allow_write); 31*25c4a958SIngo Weinhold 32*25c4a958SIngo Weinhold extern _IMPEXP_KERNEL void *beos_get_block(int dev, off_t bnum, int bsize); 33*25c4a958SIngo Weinhold extern _IMPEXP_KERNEL void *beos_get_empty_block(int dev, off_t bnum, 34*25c4a958SIngo Weinhold int bsize); 35*25c4a958SIngo Weinhold extern _IMPEXP_KERNEL int beos_release_block(int dev, off_t bnum); 36*25c4a958SIngo Weinhold extern _IMPEXP_KERNEL int beos_mark_blocks_dirty(int dev, off_t bnum, 37*25c4a958SIngo Weinhold int nblocks); 38*25c4a958SIngo Weinhold 39*25c4a958SIngo Weinhold 40*25c4a958SIngo Weinhold extern _IMPEXP_KERNEL int beos_cached_read(int dev, off_t bnum, void *data, 41*25c4a958SIngo Weinhold off_t num_blocks, int bsize); 42*25c4a958SIngo Weinhold extern _IMPEXP_KERNEL int beos_cached_write(int dev, off_t bnum, 43*25c4a958SIngo Weinhold const void *data, off_t num_blocks, int bsize); 44*25c4a958SIngo Weinhold extern _IMPEXP_KERNEL int beos_cached_write_locked(int dev, off_t bnum, 45*25c4a958SIngo Weinhold const void *data, off_t num_blocks, int bsize); 46*25c4a958SIngo Weinhold extern _IMPEXP_KERNEL int beos_set_blocks_info(int dev, off_t *blocks, 47*25c4a958SIngo Weinhold int nblocks, void (*func)(off_t bnum, 48*25c4a958SIngo Weinhold size_t nblocks, void *arg), void *arg); 49*25c4a958SIngo Weinhold 50*25c4a958SIngo Weinhold 51*25c4a958SIngo Weinhold extern _IMPEXP_KERNEL size_t beos_read_phys_blocks (int fd, off_t bnum, 52*25c4a958SIngo Weinhold void *data, uint num_blocks, int bsize); 53*25c4a958SIngo Weinhold extern _IMPEXP_KERNEL size_t beos_write_phys_blocks(int fd, off_t bnum, 54*25c4a958SIngo Weinhold void *data, uint num_blocks, int bsize); 55*25c4a958SIngo Weinhold 56*25c4a958SIngo Weinhold #ifdef __cplusplus 57*25c4a958SIngo Weinhold } // extern "C" 58*25c4a958SIngo Weinhold #endif 59*25c4a958SIngo Weinhold 60*25c4a958SIngo Weinhold #endif /* USERLAND_FS_BEOS_FS_CACHE_H */ 61