haiku/headers/posix/poll.h
Scott McCreary 0fae873352 Updated posix headers to remove commas from copyright line, to match the preferred coding guidelines.
Cleaned up some header style violations, making sure there are two blank lines after the header guards.
This fixes the posix header part of #2191.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39288 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-03 21:46:47 +00:00

39 lines
1006 B
C

/*
* Copyright 2002-2010 Haiku Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _POLL_H
#define _POLL_H
typedef unsigned long nfds_t;
struct pollfd {
int fd;
short events; /* events to look for */
short revents; /* events that occured */
};
/* events & revents - compatible with the B_SELECT_xxx definitions in Drivers.h */
#define POLLIN 0x0001 /* any readable data available */
#define POLLOUT 0x0002 /* file descriptor is writeable */
#define POLLRDNORM POLLIN
#define POLLWRNORM POLLOUT
#define POLLRDBAND 0x0008 /* priority readable data */
#define POLLWRBAND 0x0010 /* priority data can be written */
#define POLLPRI 0x0020 /* high priority readable data */
/* revents only */
#define POLLERR 0x0004 /* errors pending */
#define POLLHUP 0x0080 /* disconnected */
#define POLLNVAL 0x1000 /* invalid file descriptor */
extern
#ifdef __cplusplus
"C"
#endif
int poll(struct pollfd *fds, nfds_t numfds, int timeout);
#endif /* _POLL_H */