ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libeio/eio.h
(Generate patch)

Comparing libeio/eio.h (file contents):
Revision 1.38 by root, Thu Jul 14 19:19:22 2011 UTC vs.
Revision 1.39 by root, Thu Jul 14 19:31:43 2011 UTC

64# else 64# else
65# define EIO_STRUCT_STAT struct stat 65# define EIO_STRUCT_STAT struct stat
66# endif 66# endif
67#endif 67#endif
68 68
69#ifdef _WIN32
70typedef int eio_uid_t;
71typedef int eio_gid_t;
72typedef intptr_t eio_ssize_t; /* or SSIZE_T */
73#else
74typedef uid_t eio_uid_t;
75typedef gid_t eio_gid_t;
76typedef ssize_t eio_ssize_t;
77#endif
78
69#ifndef EIO_STRUCT_STATVFS 79#ifndef EIO_STRUCT_STATVFS
70# define EIO_STRUCT_STATVFS struct statvfs 80# define EIO_STRUCT_STATVFS struct statvfs
71#endif 81#endif
72 82
73/* for readdir */ 83/* for readdir */
189/* when initialising it, all members must be zero-initialised */ 199/* when initialising it, all members must be zero-initialised */
190struct eio_req 200struct eio_req
191{ 201{
192 eio_req volatile *next; /* private ETP */ 202 eio_req volatile *next; /* private ETP */
193 203
194 ssize_t result; /* result of syscall, e.g. result = read (... */ 204 eio_ssize_t result; /* result of syscall, e.g. result = read (... */
195 off_t offs; /* read, write, truncate, readahead, sync_file_range, fallocate: file offset, mknod: dev_t */ 205 off_t offs; /* read, write, truncate, readahead, sync_file_range, fallocate: file offset, mknod: dev_t */
196 size_t size; /* read, write, readahead, sendfile, msync, mlock, sync_file_range, fallocate: length */ 206 size_t size; /* read, write, readahead, sendfile, msync, mlock, sync_file_range, fallocate: length */
197 void *ptr1; /* all applicable requests: pathname, old name; readdir: optional eio_dirents */ 207 void *ptr1; /* all applicable requests: pathname, old name; readdir: optional eio_dirents */
198 void *ptr2; /* all applicable requests: new name or memory buffer; readdir: name strings */ 208 void *ptr2; /* all applicable requests: new name or memory buffer; readdir: name strings */
199 eio_tstamp nv1; /* utime, futime: atime; busy: sleep time */ 209 eio_tstamp nv1; /* utime, futime: atime; busy: sleep time */
339void eio_cancel (eio_req *req); 349void eio_cancel (eio_req *req);
340 350
341/*****************************************************************************/ 351/*****************************************************************************/
342/* convenience functions */ 352/* convenience functions */
343 353
344ssize_t eio_sendfile_sync (int ofd, int ifd, off_t offset, size_t count); 354eio_ssize_t eio_sendfile_sync (int ofd, int ifd, off_t offset, size_t count);
345 355
346#ifdef __cplusplus 356#ifdef __cplusplus
347} 357}
348#endif 358#endif
349 359

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines