1 #ifndef ACL_FHANDLE_INCLUDE_H 2 #define ACL_FHANDLE_INCLUDE_H 12 #include "../thread/acl_thread.h" 26 #if defined(_WIN32) || defined(_WIN64) 34 #define ACL_FHANDLE_O_FLOCK (1 << 0) 35 #define ACL_FHANDLE_O_MLOCK (1 << 1) 36 #define ACL_FHANDLE_O_MKDIR (1 << 2) 37 #define ACL_FHANDLE_O_NOATIME (1 << 3) 38 #define ACL_FHANDLE_O_DIRECT (1 << 4) 39 #define ACL_FHANDLE_O_SYNC (1 << 5) 40 #define ACL_FHANDLE_O_EXCL (1 << 6) 43 #define ACL_FHANDLE_S_FLOCK_ON (1 << 0) 44 #define ACL_FHANDLE_S_MUTEX_ON (1 << 1) 52 #define ACL_FHANDLE_PATH(x) (ACL_VSTREAM_PATH((x)->fp)) 60 void acl_fhandle_init(
int cache_size,
int debug_section,
unsigned int flags);
61 #define ACL_FHANDLE_F_LOCK (1 << 0) 80 const char *file_path,
81 int (*on_open)(
ACL_FHANDLE*,
void*),
void *open_arg,
void acl_fhandle_lock(ACL_FHANDLE *fs)
void acl_fhandle_unlock(ACL_FHANDLE *fs)
acl_pthread_mutex_t mutex
acl_pthread_t lock_mutex_tid
ACL_FHANDLE * acl_fhandle_open(size_t size, unsigned int oflags, const char *file_path, int(*on_open)(ACL_FHANDLE *, void *), void *open_arg, void(*on_close)(ACL_FHANDLE *))
void(* on_close)(ACL_FHANDLE *)
void acl_fhandle_init(int cache_size, int debug_section, unsigned int flags)
void acl_fhandle_close(ACL_FHANDLE *fs, int delay_timeout)
void acl_fhandle_end(void)