… | |
… | |
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); |
… | |
… | |
245 | eio_tstamp nv2; /* utime, futime: mtime */ |
245 | eio_tstamp nv2; /* utime, futime: mtime */ |
246 | |
246 | |
247 | int type; /* EIO_xxx constant ETP */ |
247 | int type; /* EIO_xxx constant ETP */ |
248 | int int1; /* all applicable requests: file descriptor; sendfile: output fd; open, msync, mlockall, readdir: flags */ |
248 | int int1; /* all applicable requests: file descriptor; sendfile: output fd; open, msync, mlockall, readdir: flags */ |
249 | long int2; /* chown, fchown: uid; sendfile: input fd; open, chmod, mkdir, mknod: file mode, sync_file_range, fallocate: flags */ |
249 | long int2; /* chown, fchown: uid; sendfile: input fd; open, chmod, mkdir, mknod: file mode, sync_file_range, fallocate: flags */ |
250 | long int3; /* chown, fchown: gid; rename: working directory of new name */ |
250 | long int3; /* chown, fchown: gid; rename, link: working directory of new name */ |
251 | int errorno; /* errno value on syscall return */ |
251 | int errorno; /* errno value on syscall return */ |
252 | |
252 | |
253 | #if __i386 || __amd64 |
253 | #if __i386 || __amd64 |
254 | unsigned char cancelled; |
254 | unsigned char cancelled; |
255 | #else |
255 | #else |
… | |
… | |
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); |