1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
#ifndef FSCACHE_H
#define FSCACHE_H
/*
* The fscache is thread specific. enable_fscache() must be called
* for each thread where caching is desired.
*/
extern CRITICAL_SECTION fscache_cs;
int fscache_enable(size_t initial_size);
#define enable_fscache(initial_size) fscache_enable(initial_size)
void fscache_disable(void);
#define disable_fscache() fscache_disable()
int fscache_enabled(const char *path);
#define is_fscache_enabled(path) fscache_enabled(path)
void fscache_flush(void);
#define flush_fscache() fscache_flush()
DIR *fscache_opendir(const char *dir);
int fscache_lstat(const char *file_name, struct stat *buf);
int fscache_is_mount_point(struct strbuf *path);
/* opaque fscache structure */
struct fscache;
struct fscache *fscache_getcache(void);
#define getcache_fscache() fscache_getcache()
void fscache_merge(struct fscache *dest);
#define merge_fscache(dest) fscache_merge(dest)
#endif
|