asynchio.h

Go to the documentation of this file.
00001 /*      asynchio.h - Asynchronous I/O                   Author: Kees J. Bot
00002  *                                                              26 Jan 1995
00003  * This is just a fake async I/O library to be used for programs
00004  * written for Minix-vmd that must also run under standard Minix.
00005  * This limits the number of ugly #ifdefs somewhat.  The programs must
00006  * be restricted to performing just one service, of course.
00007  */
00008 #ifndef _SYS__ASYNCHIO_H
00009 #define _SYS__ASYNCHIO_H
00010 
00011 #ifndef _ANSI_H
00012 #include <ansi.h>
00013 #endif
00014 
00015 #include <sys/time.h>
00016 
00017 typedef struct {
00018         char    state;
00019         char    op;
00020         char    fd;
00021         char    req;
00022         void    *data;
00023         ssize_t count;
00024         int     errno;
00025 } asynchio_t;
00026 
00027 #define ASYN_NONBLOCK   0x01
00028 
00029 #define ASYN_INPROGRESS EINPROGRESS
00030 
00031 void asyn_init(asynchio_t *_asyn);
00032 ssize_t asyn_read(asynchio_t *_asyn, int _fd, void *_buf, size_t _len);
00033 ssize_t asyn_write(asynchio_t *_asyn, int _fd, const void *_buf, size_t _len);
00034 int asyn_ioctl(asynchio_t *_asyn, int _fd, unsigned long _request, void *_data);
00035 int asyn_wait(asynchio_t *_asyn, int _flags, struct timeval *to);
00036 int asyn_synch(asynchio_t *_asyn, int _fd);
00037 int asyn_close(asynchio_t *_asyn, int _fd);
00038 
00039 #endif /* _SYS__ASYNCHIO_H */

Generated on Fri Apr 14 22:57:22 2006 for minix by  doxygen 1.4.6