aboutsummaryrefslogtreecommitdiff
path: root/unix/hlib/libc/fpoll.h
blob: 52e6f4d5aa04a2178735534f0a01f82700d9994a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/* File poll structure definitions (c_fpoll).
 */
#ifndef D_fpoll
#define D_fpoll

#define IRAF_POLLIN      0x0001    	/* There is data to read 	*/
#define IRAF_POLLPRI     0x0002    	/* There is urgent data to read */
#define IRAF_POLLOUT     0x0004    	/* Writing now will not block 	*/
#define IRAF_POLLERR     0x0008    	/* Error condition 		*/
#define IRAF_POLLHUP     0x0010    	/* Hung up 			*/
#define IRAF_POLLNVAL    0x0020    	/* Invalid request: fd not open */

#define SZ_POLLFD	 3		/* size of pollfd SPP struct	*/
#define MAX_POLL_FD	32		/* max number of polling fds	*/
#define INFTIM	 	-1		/* poll indefinitely (block)    */

struct _fpoll {
	XINT	fp_fd;			/* file type                    */
	XSHORT	fp_events;		/* file size, machine bytes     */
	XSHORT	fp_revents;		/* time of last access          */
} poll_fds[MAX_POLL_FD];

#ifndef NOLIBCNAMES
#define _IRAF_FPOLL_LIBCNAMES


#ifdef  POLLIN
#undef  POLLIN
#endif
#define POLLIN      IRAF_POLLIN

#ifdef  POLLPRI
#undef  POLLPRI
#endif

#define POLLPRI     IRAF_POLLPRI
#ifdef  POLLOUT
#undef  POLLOUT
#endif

#define POLLOUT     IRAF_POLLOUT
#ifdef  POLLERR
#undef  POLLERR
#endif
#define POLLERR     IRAF_POLLERR

#ifdef  POLLHUP
#undef  POLLHUP
#endif
#define POLLHUP     IRAF_POLLHUP

#ifdef  POLLNVAL
#undef  POLLNVAL
#endif
#define POLLNVAL    IRAF_POLLNVAL

#endif  /* ! NOLIBCNAMES */

#endif