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

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

56#ifndef EIO_REQ_MEMBERS 56#ifndef EIO_REQ_MEMBERS
57# define EIO_REQ_MEMBERS 57# define EIO_REQ_MEMBERS
58#endif 58#endif
59 59
60#ifndef EIO_STRUCT_STAT 60#ifndef EIO_STRUCT_STAT
61# ifdef _WIN32
62# define EIO_STRUCT_STAT struct _stati64
63# define EIO_STRUCT_STATI64
64# else
61# define EIO_STRUCT_STAT struct stat 65# define EIO_STRUCT_STAT struct stat
66# endif
67#endif
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;
62#endif 77#endif
63 78
64#ifndef EIO_STRUCT_STATVFS 79#ifndef EIO_STRUCT_STATVFS
65# define EIO_STRUCT_STATVFS struct statvfs 80# define EIO_STRUCT_STATVFS struct statvfs
66#endif 81#endif
184/* when initialising it, all members must be zero-initialised */ 199/* when initialising it, all members must be zero-initialised */
185struct eio_req 200struct eio_req
186{ 201{
187 eio_req volatile *next; /* private ETP */ 202 eio_req volatile *next; /* private ETP */
188 203
189 ssize_t result; /* result of syscall, e.g. result = read (... */ 204 eio_ssize_t result; /* result of syscall, e.g. result = read (... */
190 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 */
191 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 */
192 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 */
193 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 */
194 eio_tstamp nv1; /* utime, futime: atime; busy: sleep time */ 209 eio_tstamp nv1; /* utime, futime: atime; busy: sleep time */
334void eio_cancel (eio_req *req); 349void eio_cancel (eio_req *req);
335 350
336/*****************************************************************************/ 351/*****************************************************************************/
337/* convenience functions */ 352/* convenience functions */
338 353
339ssize_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);
340 355
341#ifdef __cplusplus 356#ifdef __cplusplus
342} 357}
343#endif 358#endif
344 359

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines