20#ifndef ZEPHYR_INCLUDE_POSIX_SYS_SELECT_H_
21#define ZEPHYR_INCLUDE_POSIX_SYS_SELECT_H_
23#include <zephyr/sys/fdtable.h>
30#define FD_SETSIZE ZVFS_FD_SETSIZE
32#if !defined(_SIGSET_T_DECLARED) && !defined(__sigset_t_defined)
35#define SIGRTMIN (CONFIG_THREAD_CANCEL_SIGNAL_NUMBER + 2)
37#if defined(_POSIX_REALTIME_SIGNALS)
38BUILD_ASSERT(CONFIG_POSIX_RTSIG_MAX >= 0);
40#define SIGRTMAX (SIGRTMIN + CONFIG_POSIX_RTSIG_MAX)
44#define SIGRTMAX SIGRTMIN
49 unsigned long sig[DIV_ROUND_UP(SIGRTMAX + 1, BITS_PER_LONG)];
51#define _SIGSET_T_DECLARED
52#define __sigset_t_defined
55#if !defined(_SUSECONDS_T_DECLARED) && !defined(__suseconds_t_defined)
58#define _SUSECONDS_T_DECLARED
59#define __suseconds_t_defined
65#if __STDC_VERSION__ >= 201112L
68#if !defined(_TIMESPEC_DECLARED) && !defined(__timespec_defined)
74#define _TIMESPEC_DECLARED
75#define __timespec_defined
79#if !defined(_TIMEVAL_DECLARED) && !defined(__timeval_defined)
85#define _TIMEVAL_DECLARED
86#define __timeval_defined
void FD_CLR(int fd, fd_set *fdset)
Remove a file descriptor from an fd_set.
int pselect(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, const struct timespec *timeout, const sigset_t *sigmask)
Synchronous multiplexed I/O with signal-mask and nanosecond timeout.
void FD_ZERO(fd_set *fdset)
Clear all file descriptors from an fd_set.
int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *timeout)
Synchronous multiplexed I/O (legacy interface, use pselect() for new code).
void FD_SET(int fd, fd_set *fdset)
Add a file descriptor to an fd_set.
int FD_ISSET(int fd, fd_set *fdset)
Test whether a file descriptor is in an fd_set.
long suseconds_t
Microsecond time component type.
struct zvfs_fd_set fd_set
Set of file descriptors for select()/pselect().
Set of signals (bitmask).
Time value with nanosecond resolution.
long tv_nsec
Nanoseconds [0, 999999999].
Time value with microsecond resolution.
suseconds_t tv_usec
Microseconds [0, 999999].
POSIX time-of-day types and functions (<sys/time.h>)