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

Comparing libeio/eio.h (file contents):
Revision 1.12 by root, Sat May 17 12:17:25 2008 UTC vs.
Revision 1.14 by root, Tue Jun 3 05:12:51 2008 UTC

38 */ 38 */
39 39
40#ifndef EIO_H_ 40#ifndef EIO_H_
41#define EIO_H_ 41#define EIO_H_
42 42
43#ifdef __cplusplus
44extern "C" {
45#endif
46
43#include <stddef.h> 47#include <stddef.h>
44#include <sys/types.h> 48#include <sys/types.h>
45 49
46typedef struct eio_req eio_req; 50typedef struct eio_req eio_req;
47 51
67 EIO_SYNC, EIO_FSYNC, EIO_FDATASYNC, 71 EIO_SYNC, EIO_FSYNC, EIO_FDATASYNC,
68 EIO_UNLINK, EIO_RMDIR, EIO_MKDIR, EIO_RENAME, 72 EIO_UNLINK, EIO_RMDIR, EIO_MKDIR, EIO_RENAME,
69 EIO_MKNOD, EIO_READDIR, 73 EIO_MKNOD, EIO_READDIR,
70 EIO_LINK, EIO_SYMLINK, EIO_READLINK, 74 EIO_LINK, EIO_SYMLINK, EIO_READLINK,
71 EIO_GROUP, EIO_NOP, 75 EIO_GROUP, EIO_NOP,
72 EIO_BUSY, 76 EIO_BUSY, EIO_CUSTOM
73}; 77};
74 78
75typedef double eio_tstamp; /* feel free to use double in your code directly */ 79typedef double eio_tstamp; /* feel free to use double in your code directly */
76 80
77/* eio request structure */ 81/* eio request structure */
114}; 118};
115 119
116enum { 120enum {
117 EIO_PRI_MIN = -4, 121 EIO_PRI_MIN = -4,
118 EIO_PRI_MAX = 4, 122 EIO_PRI_MAX = 4,
119
120 EIO_PRI_DEFAULT = 0, 123 EIO_PRI_DEFAULT = 0,
121}; 124};
122 125
123/* returns < 0 on error, errno set 126/* returns < 0 on error, errno set
124 * need_poll, if non-zero, will be called when results are available 127 * need_poll, if non-zero, will be called when results are available
125 * and eio_poll_cb needs to be invoked (it MUST NOT call eio_poll_cb itself). 128 * and eio_poll_cb needs to be invoked (it MUST NOT call eio_poll_cb itself).
182eio_req *eio_lstat (const char *path, int pri, eio_cb cb, void *data); /* stat buffer=ptr2 allocated dynamically */ 185eio_req *eio_lstat (const char *path, int pri, eio_cb cb, void *data); /* stat buffer=ptr2 allocated dynamically */
183eio_req *eio_mknod (const char *path, mode_t mode, dev_t dev, int pri, eio_cb cb, void *data); 186eio_req *eio_mknod (const char *path, mode_t mode, dev_t dev, int pri, eio_cb cb, void *data);
184eio_req *eio_link (const char *path, const char *new_path, int pri, eio_cb cb, void *data); 187eio_req *eio_link (const char *path, const char *new_path, int pri, eio_cb cb, void *data);
185eio_req *eio_symlink (const char *path, const char *new_path, int pri, eio_cb cb, void *data); 188eio_req *eio_symlink (const char *path, const char *new_path, int pri, eio_cb cb, void *data);
186eio_req *eio_rename (const char *path, const char *new_path, int pri, eio_cb cb, void *data); 189eio_req *eio_rename (const char *path, const char *new_path, int pri, eio_cb cb, void *data);
190eio_req *eio_custom (eio_cb execute, int pri, eio_cb cb, void *data);
187#endif 191#endif
188 192
189/*****************************************************************************/ 193/*****************************************************************************/
190/* groups */ 194/* groups */
191 195
217/*****************************************************************************/ 221/*****************************************************************************/
218/* convinience functions */ 222/* convinience functions */
219 223
220ssize_t eio_sendfile_sync (int ofd, int ifd, off_t offset, size_t count); 224ssize_t eio_sendfile_sync (int ofd, int ifd, off_t offset, size_t count);
221 225
226#ifdef __cplusplus
227}
222#endif 228#endif
223 229
230#endif
231

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines