source: trunk/minix/include/sys/asynchio.h@ 10

Last change on this file since 10 was 9, checked in by Mattia Monga, 13 years ago

Minix 3.1.2a

File size: 1.1 KB
Line 
1/* asynchio.h - Asynchronous I/O Author: Kees J. Bot
2 * 26 Jan 1995
3 * This is just a fake async I/O library to be used for programs
4 * written for Minix-vmd that must also run under standard Minix.
5 * This limits the number of ugly #ifdefs somewhat. The programs must
6 * be restricted to performing just one service, of course.
7 */
8#ifndef _SYS__ASYNCHIO_H
9#define _SYS__ASYNCHIO_H
10
11#ifndef _ANSI_H
12#include <ansi.h>
13#endif
14
15#include <sys/time.h>
16
17typedef struct {
18 char state;
19 char op;
20 char fd;
21 char req;
22 void *data;
23 ssize_t count;
24 int errno;
25} asynchio_t;
26
27#define ASYN_NONBLOCK 0x01
28
29#define ASYN_INPROGRESS EINPROGRESS
30
31void asyn_init(asynchio_t *_asyn);
32ssize_t asyn_read(asynchio_t *_asyn, int _fd, void *_buf, size_t _len);
33ssize_t asyn_write(asynchio_t *_asyn, int _fd, const void *_buf, size_t _len);
34int asyn_ioctl(asynchio_t *_asyn, int _fd, unsigned long _request, void *_data);
35int asyn_wait(asynchio_t *_asyn, int _flags, struct timeval *to);
36int asyn_synch(asynchio_t *_asyn, int _fd);
37int asyn_close(asynchio_t *_asyn, int _fd);
38
39#endif /* _SYS__ASYNCHIO_H */
Note: See TracBrowser for help on using the repository browser.