posix-next API 0.1.0
Out-of-tree Zephyr POSIX module
Loading...
Searching...
No Matches
select.h File Reference

POSIX select API (<sys/select.h>) More...

#include <zephyr/sys/fdtable.h>
#include <time.h>
Include dependency graph for select.h:

Go to the source code of this file.

Data Structures

struct  sigset_t
 Type representing a set of signals (bitmask). More...
 
struct  timespec
 Time value with nanosecond resolution. More...
 
struct  timeval
 Time value with microsecond resolution. More...
 

Macros

#define FD_SETSIZE   ZVFS_FD_SETSIZE
 Maximum number of file descriptors in an fd_set.
 
#define SIGRTMIN   32
 
#define SIGRTMAX   (SIGRTMIN + CONFIG_POSIX_RTSIG_MAX)
 Largest real-time signal number.
 
#define _SIGSET_T_DECLARED
 
#define __sigset_t_defined
 
#define _SUSECONDS_T_DECLARED
 
#define __suseconds_t_defined
 
#define _TIMESPEC_DECLARED
 
#define __timespec_defined
 
#define _TIMEVAL_DECLARED
 
#define __timeval_defined
 

Typedefs

typedef long suseconds_t
 Microsecond time component type.
 
typedef struct zvfs_fd_set fd_set
 Set of file descriptors for select()/pselect().
 

Functions

 BUILD_ASSERT (CONFIG_POSIX_RTSIG_MAX >=0)
 
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.
 
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_CLR (int fd, fd_set *fdset)
 Remove a file descriptor from an fd_set.
 
int FD_ISSET (int fd, fd_set *fdset)
 Test whether a file descriptor is in an fd_set.
 
void FD_SET (int fd, fd_set *fdset)
 Add a file descriptor to an fd_set.
 
void FD_ZERO (fd_set *fdset)
 Clear all file descriptors from an fd_set.
 

Detailed Description

POSIX select API (<sys/select.h>)

Provides the select() and pselect() functions and the associated fd_set type and macros for multiplexed I/O.

See also
POSIX.1-2017 <sys/select.h>

Definition in file select.h.

Macro Definition Documentation

◆ __sigset_t_defined

#define __sigset_t_defined

Definition at line 50 of file select.h.

◆ __suseconds_t_defined

#define __suseconds_t_defined

Definition at line 57 of file select.h.

◆ __timespec_defined

#define __timespec_defined

Definition at line 73 of file select.h.

◆ __timeval_defined

#define __timeval_defined

Definition at line 84 of file select.h.

◆ _SIGSET_T_DECLARED

#define _SIGSET_T_DECLARED

Definition at line 49 of file select.h.

◆ _SUSECONDS_T_DECLARED

#define _SUSECONDS_T_DECLARED

Definition at line 56 of file select.h.

◆ _TIMESPEC_DECLARED

#define _TIMESPEC_DECLARED

Definition at line 72 of file select.h.

◆ _TIMEVAL_DECLARED

#define _TIMEVAL_DECLARED

Definition at line 83 of file select.h.

◆ SIGRTMIN

#define SIGRTMIN   32

Definition at line 35 of file select.h.