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)
37#if defined(_POSIX_REALTIME_SIGNALS) || defined(__DOXYGEN__)
38BUILD_ASSERT(CONFIG_POSIX_RTSIG_MAX >= 0);
40#define SIGRTMAX (SIGRTMIN + CONFIG_POSIX_RTSIG_MAX)
42#define SIGRTMAX SIGRTMIN
47 unsigned long sig[DIV_ROUND_UP(
SIGRTMAX + 1, BITS_PER_LONG)];
49#define _SIGSET_T_DECLARED
50#define __sigset_t_defined
53#if !defined(_SUSECONDS_T_DECLARED) && !defined(__suseconds_t_defined)
56#define _SUSECONDS_T_DECLARED
57#define __suseconds_t_defined
63#if __STDC_VERSION__ >= 201112L
66#if !defined(_TIMESPEC_DECLARED) && !defined(__timespec_defined)
72#define _TIMESPEC_DECLARED
73#define __timespec_defined
77#if !defined(_TIMEVAL_DECLARED) && !defined(__timeval_defined)
83#define _TIMEVAL_DECLARED
84#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.
#define SIGRTMAX
Largest real-time signal number.
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().
Type representing a 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>)