… | |
… | |
90 | # define EIO_STRUCT_STATVFS struct statvfs |
90 | # define EIO_STRUCT_STATVFS struct statvfs |
91 | #endif |
91 | #endif |
92 | |
92 | |
93 | /* managing working directories */ |
93 | /* managing working directories */ |
94 | |
94 | |
95 | typedef void *eio_wd; |
95 | typedef struct eio_pwd *eio_wd; |
96 | |
96 | |
97 | #define EIO_CWD 0 /* the current working directory of the process, guaranteed to be a null pointer */ |
97 | #define EIO_CWD 0 /* the current working directory of the process, guaranteed to be a null pointer */ |
98 | #define EIO_INVALID_WD ((eio_wd)(int)-1) /* failure return for eio_wd_open */ |
98 | #define EIO_INVALID_WD ((eio_wd)(int)-1) /* failure return for eio_wd_open */ |
99 | |
99 | |
100 | eio_wd eio_wd_open_sync (eio_wd wd, const char *path); |
100 | eio_wd eio_wd_open_sync (eio_wd wd, const char *path); |
… | |
… | |
310 | |
310 | |
311 | /*****************************************************************************/ |
311 | /*****************************************************************************/ |
312 | /* convenience wrappers */ |
312 | /* convenience wrappers */ |
313 | |
313 | |
314 | #ifndef EIO_NO_WRAPPERS |
314 | #ifndef EIO_NO_WRAPPERS |
|
|
315 | eio_req *eio_wd_open (const char *path, int pri, eio_cb cb, void *data); /* result=wd */ |
|
|
316 | eio_req *eio_wd_close (eio_wd wd, int pri, eio_cb cb, void *data); |
315 | eio_req *eio_nop (int pri, eio_cb cb, void *data); /* does nothing except go through the whole process */ |
317 | eio_req *eio_nop (int pri, eio_cb cb, void *data); /* does nothing except go through the whole process */ |
316 | eio_req *eio_busy (eio_tstamp delay, int pri, eio_cb cb, void *data); /* ties a thread for this long, simulating busyness */ |
318 | eio_req *eio_busy (eio_tstamp delay, int pri, eio_cb cb, void *data); /* ties a thread for this long, simulating busyness */ |
317 | eio_req *eio_sync (int pri, eio_cb cb, void *data); |
319 | eio_req *eio_sync (int pri, eio_cb cb, void *data); |
318 | eio_req *eio_fsync (int fd, int pri, eio_cb cb, void *data); |
320 | eio_req *eio_fsync (int fd, int pri, eio_cb cb, void *data); |
319 | eio_req *eio_fdatasync (int fd, int pri, eio_cb cb, void *data); |
321 | eio_req *eio_fdatasync (int fd, int pri, eio_cb cb, void *data); |