Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
select.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019 Linaro Limited
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6#ifndef ZEPHYR_INCLUDE_POSIX_SYS_SELECT_H_
7#define ZEPHYR_INCLUDE_POSIX_SYS_SELECT_H_
8
9#include <net/socket_select.h>
10#include <sys/_timeval.h>
11
12#define fd_set zsock_fd_set
13#define FD_SETSIZE ZSOCK_FD_SETSIZE
14#define FD_ZERO ZSOCK_FD_ZERO
15#define FD_SET ZSOCK_FD_SET
16#define FD_CLR ZSOCK_FD_CLR
17#define FD_ISSET ZSOCK_FD_ISSET
18
19struct timeval;
20
21static inline int select(int nfds, fd_set *readfds,
22 fd_set *writefds, fd_set *exceptfds,
23 struct timeval *timeout)
24{
25 return zsock_select(nfds, readfds, writefds, exceptfds,
26 (struct zsock_timeval *)timeout);
27}
28
29#endif /* ZEPHYR_INCLUDE_POSIX_SYS_SELECT_H_ */
ZTEST_BMEM int timeout
Definition: main.c:31
int zsock_select(int nfds, zsock_fd_set *readfds, zsock_fd_set *writefds, zsock_fd_set *exceptfds, struct zsock_timeval *timeout)
Legacy function to poll multiple sockets for events.
#define fd_set
Definition: select.h:12
static int select(int nfds, zsock_fd_set *readfds, zsock_fd_set *writefds, zsock_fd_set *exceptfds, struct timeval *timeout)
Definition: select.h:21
Definition: _timeval.h:22
Definition: socket_types.h:43