Tenok
A Linux-like Real-Time Operating System for Robotics and Internet of Things
poll.h
Go to the documentation of this file.
1 
4 #ifndef __POLL_H__
5 #define __POLL_H__
6 
7 #include <signal.h>
8 #include <stdint.h>
9 
10 #define POLLIN 1
11 #define POLLOUT 4
12 #define POLLNVAL 32
13 
14 typedef uint32_t nfds_t;
15 
16 struct pollfd {
17  int fd; /* File descriptor number */
18  short events; /* Requested events */
19  short revents; /* Returned events */
20 };
21 
33 int poll(struct pollfd *fds, nfds_t nfds, int timeout);
34 
46 int ppoll(struct pollfd *fds,
47  nfds_t nfds,
48  const struct timespec *timeout_ts,
49  const sigset_t *sigmask);
50 
51 #endif
Definition: poll.h:16
Definition: time.h:16
int poll(struct pollfd *fds, nfds_t nfds, int timeout)
Wait for one of a set of file descriptors to become ready to perform I/O.
Definition: file.c:423
int ppoll(struct pollfd *fds, nfds_t nfds, const struct timespec *timeout_ts, const sigset_t *sigmask)
Wait for one of the descriptors to become ready, with the timeout given as a timespec....
Definition: file.c:428