File: poll.h

package info (click to toggle)
iraf 2.18.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 86,000 kB
  • sloc: ansic: 115,890; fortran: 74,576; lisp: 18,888; yacc: 5,642; sh: 961; lex: 596; makefile: 509; asm: 159; csh: 54; xml: 33; sed: 4
file content (26 lines) | stat: -rw-r--r-- 1,092 bytes parent folder | download | duplicates (4)
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
# POLL.H -- FPOLL definitions (poll a set of file descriptors).

define  MAX_POLL_FD    	32              # max number of polling fds
define  MPFD		MAX_POLL_FD    	# utility shorthand
define	LEN_FPOLL	(4+(3*MPFD))	# length of polling structure

define	INFTIM		-1		# poll will block until event


# Structure of file descriptor/event pairs supplied in the poll arrays. The
# array elements are zero-indexed.
define	POLL_NFD	Memi[$1]	       # no. of file descriptors to poll
define	POLL_FD		Memi[$1+1+(0*MPFD)+$2] # file descriptor array
define	POLL_EVENTS	Memi[$1+1+(1*MPFD)+$2] # events of interest on fd
define	POLL_REVENTS	Memi[$1+1+(2*MPFD)+$2] # (return) events on fd

# Testable select events.
define 	POLLIN		001B		# fd is readable
define 	POLLPRI		002B		# priority info at fd
define 	POLLOUT         004B		# fd is writeable (won't block)

# Non-testable poll events (may not be specified in events field,
# but may be returned in revents field).
define POLLERR		010B		# fd has error condition
define POLLHUP		020B		# fd has been hung up on
define POLLNVAL		040B		# invalid pollfd entry