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 <zephyr/posix/posix_types.h>
10 #include <zephyr/sys/fdtable.h>
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 #define FD_SETSIZE ZVFS_FD_SETSIZE
17 
18 typedef struct zvfs_fd_set fd_set;
19 
20 struct timeval;
21 
22 int pselect(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
23 	    const struct timespec *timeout, const void *sigmask);
24 int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *timeout);
25 void FD_CLR(int fd, fd_set *fdset);
26 int FD_ISSET(int fd, fd_set *fdset);
27 void FD_SET(int fd, fd_set *fdset);
28 void FD_ZERO(fd_set *fdset);
29 
30 #ifdef __cplusplus
31 }
32 #endif
33 
34 #endif /* ZEPHYR_INCLUDE_POSIX_SYS_SELECT_H_ */
35