12#ifndef ZEPHYR_INCLUDE_NET_SOCKET_SELECT_H_
13#define ZEPHYR_INCLUDE_NET_SOCKET_SELECT_H_
31typedef struct zsock_fd_set {
32 uint32_t bitset[(CONFIG_POSIX_MAX_FDS + 31) / 32];
54 zsock_fd_set *writefds,
55 zsock_fd_set *exceptfds,
56 struct zsock_timeval *timeout);
59#define ZSOCK_FD_SETSIZE (sizeof(((zsock_fd_set *)0)->bitset) * 8)
119#ifdef CONFIG_NET_SOCKETS_POSIX_NAMES
121#define fd_set zsock_fd_set
122#define FD_SETSIZE ZSOCK_FD_SETSIZE
124static inline int select(
int nfds, zsock_fd_set *readfds,
125 zsock_fd_set *writefds, zsock_fd_set *exceptfds,
128 return zsock_select(nfds, readfds, writefds, exceptfds, timeout);
131static inline void FD_ZERO(zsock_fd_set *set)
136static inline int FD_ISSET(
int fd, zsock_fd_set *set)
141static inline void FD_CLR(
int fd, zsock_fd_set *set)
146static inline void FD_SET(
int fd, zsock_fd_set *set)
159#include <syscalls/socket_select.h>
int ZSOCK_FD_ISSET(int fd, zsock_fd_set *set)
Check whether socket is a member of fd_set.
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.
void ZSOCK_FD_SET(int fd, zsock_fd_set *set)
Add socket to fd_set.
void ZSOCK_FD_CLR(int fd, zsock_fd_set *set)
Remove socket from fd_set.
void ZSOCK_FD_ZERO(zsock_fd_set *set)
Initialize (clear) fd_set.
#define FD_SET
Definition: select.h:19
#define FD_CLR
Definition: select.h:20
int select(int nfds, zsock_fd_set *readfds, zsock_fd_set *writefds, zsock_fd_set *exceptfds, struct timeval *timeout)
#define FD_ZERO
Definition: select.h:18
#define FD_ISSET
Definition: select.h:21
socket types definitionis
__UINT32_TYPE__ uint32_t
Definition: stdint.h:90
Definition: _timeval.h:22