|
|
1.1 root 1: /* (-lgl
2: * COHERENT 386 Device Driver Kit release 2.0
3: * Copyright (c) 1982, 1992 by Mark Williams Company.
4: * All rights reserved. May not be copied without permission.
5: -lgl) */
6: #ifndef __SYS_SELECT_H__
7: #define __SYS_SELECT_H__
8:
9: #include <stdio.h>
10:
11: #if _NFILE <= 32
12:
13: typedef int fd_set;
14:
15: #define FD_ZERO(fdp) {*fdp = 0;}
16: #define FD_SET(b,fdp) (*fdp |= 1 << (b))
17: #define FD_ISSET(b,fdp) (*fdp & 1 << (b))
18: #define FD_SETSIZE 32
19:
20: #else
21:
22: typedef int fd_set[2];
23:
24: #define FD_ZERO(fdp) {(*fdp)[0]=(*fdp)[1]=0;}
25: #define FD_SET(b,fdp) ((*fdp)[((b)>>5)&1] |= 1 << ((b)&0x1F))
26: #define FD_ISSET(b,fdp) ((*fdp)[((b)>>5)&1] & 1 << ((b)&0x1F))
27: #define FD_SETSIZE 64
28:
29: #endif
30:
31: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.