From: Ben Gras Date: Tue, 12 Jul 2005 13:10:06 +0000 (+0000) Subject: Misc fixes and additions X-Git-Tag: v3.1.0~625 X-Git-Url: http://zhaoyanbai.com/repos/doc/tz-art.htm?a=commitdiff_plain;h=d4b173ee50be61d9f757a65d5c2d9f482f04bc8b;p=minix.git Misc fixes and additions --- diff --git a/include/sys/asynchio.h b/include/sys/asynchio.h index 06bac33d8..0fa9280f5 100755 --- a/include/sys/asynchio.h +++ b/include/sys/asynchio.h @@ -26,7 +26,6 @@ typedef struct { #define ASYN_NONBLOCK 0x01 -#define EINPROGRESS EINTR #define ASYN_INPROGRESS EINPROGRESS void asyn_init(asynchio_t *_asyn); diff --git a/include/sys/ioc_disk.h b/include/sys/ioc_disk.h index d5faae3d9..6127a270f 100755 --- a/include/sys/ioc_disk.h +++ b/include/sys/ioc_disk.h @@ -11,5 +11,6 @@ #define DIOCSETP _IOW('d', 3, struct partition) #define DIOCGETP _IOR('d', 4, struct partition) #define DIOCEJECT _IO ('d', 5) +#define DIOCTIMEOUT _IOW('d', 6, int) #endif /* _S_I_DISK_H */ diff --git a/include/sys/select.h b/include/sys/select.h index 67c1eb99e..5091afc01 100755 --- a/include/sys/select.h +++ b/include/sys/select.h @@ -31,10 +31,10 @@ typedef struct { _PROTOTYPE( int select, (int nfds, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *timeout) ); -#define FD_ZERO(s) do { int _i; for(_i = 0; _i < _FDSETWORDS; _i++) { (s)->_fdsetval[_i] = 0; } } while(0) -#define FD_SET(f, s) do { (s)->_fdsetval[_FD_BITWORD(f)] |= _FD_BITMASK(f); } while(0) -#define FD_CLR(f, s) do { (s)->_fdsetval[_FD_BITWORD(f)] &= ~(_FD_BITMASK(f)); } while(0) -#define FD_ISSET(f, s) ((s)->_fdsetval[_FD_BITWORD(f)] & _FD_BITMASK(f)) +#define FD_ZERO(s) do { int _i; for(_i = 0; _i < _FDSETWORDS; _i++) { (s)->fds_bits[_i] = 0; } } while(0) +#define FD_SET(f, s) do { (s)->fds_bits[_FD_BITWORD(f)] |= _FD_BITMASK(f); } while(0) +#define FD_CLR(f, s) do { (s)->fds_bits[_FD_BITWORD(f)] &= ~(_FD_BITMASK(f)); } while(0) +#define FD_ISSET(f, s) ((s)->fds_bits[_FD_BITWORD(f)] & _FD_BITMASK(f)) /* possible select() operation types; read, write, errors */ /* (FS/driver internal use only) */