Version increased to unfs3_0.9.22+dfsg-1maemo3
[unfs3] / unfs3 / fd_cache.h
1 /*
2  * UNFS3 file descriptor cache
3  * (C) 2004, Pascal Schmidt
4  * see file LICENSE for license details
5  */
6
7 #ifndef UNFS3_FD_CACHE_H
8 #define UNFS3_FD_CACHE_H
9
10 /* FD_READ and FD_WRITE are already defined on Win32 */
11 #define UNFS3_FD_READ  0                        /* fd for READ */
12 #define UNFS3_FD_WRITE 1                        /* fd for WRITE */
13
14 #define FD_CLOSE_VIRT 0         /* virtually close the fd */
15 #define FD_CLOSE_REAL 1         /* really close the fd */
16
17 /* statistics */
18 extern int fd_cache_readers;
19 extern int fd_cache_writers;
20
21 void fd_cache_init(void);
22
23 int fd_open(const char *path, nfs_fh3 fh, int kind, int allow_caching);
24 int fd_close(int fd, int kind, int really_close);
25 int fd_sync(nfs_fh3 nfh);
26 void fd_cache_purge(void);
27 void fd_cache_close_inactive(void);
28
29 #endif