1#ifndef __VSF_LINUX_SYS_SELECT_H__
2#define __VSF_LINUX_SYS_SELECT_H__
6#if VSF_LINUX_CFG_RELATIVE_PATH == ENABLED
7# include "../sys/time.h"
20#if VSF_LINUX_CFG_WRAPPER == ENABLED
21# define select VSF_LINUX_WRAPPER(select)
22#elif defined(__WIN__) && !defined(__VSF_APPLET__)
23# define select VSF_LINUX_WRAPPER(select)
24# define pselect VSF_LINUX_WRAPPER(pselect)
29#define __NR_select select
32# define FD_SETSIZE 1024
34#define FD_ZERO(set) vsf_bitmap_reset((set)->fds_bits, FD_SETSIZE)
35#define FD_SET(fd, set) vsf_bitmap_set((set)->fds_bits, (fd))
36#define FD_CLR(fd, set) vsf_bitmap_clear((set)->fds_bits, (fd))
37#define FD_ISSET(fd, set) vsf_bitmap_get((set)->fds_bits, (fd))
39#define NFDBITS (sizeof(fd_mask) << 3)
47#if VSF_LINUX_APPLET_USE_SYS_SELECT == ENABLED
54# ifndef __VSF_APPLET__
59#if defined(__VSF_APPLET__) && (defined(__VSF_APPLET_LIB__) || defined(__VSF_APPLET_LINUX_SYS_SELECT_LIB__))\
60 && VSF_APPLET_CFG_ABI_PATCH != ENABLED && VSF_LINUX_APPLET_USE_SYS_SELECT == ENABLED
62#ifndef VSF_LINUX_APPLET_SYS_SELECT_VPLT
63# if VSF_LINUX_USE_APPLET == ENABLED
64# define VSF_LINUX_APPLET_SYS_SELECT_VPLT \
65 ((vsf_linux_sys_select_vplt_t *)(VSF_LINUX_APPLET_VPLT->sys_select_vplt))
67# define VSF_LINUX_APPLET_SYS_SELECT_VPLT \
68 ((vsf_linux_sys_select_vplt_t *)vsf_vplt((void *)0))
72#define VSF_LINUX_APPLET_SYS_SELECT_ENTRY(__NAME) \
73 VSF_APPLET_VPLT_ENTRY_FUNC_ENTRY(VSF_LINUX_APPLET_SYS_SELECT_VPLT, __NAME)
74#define VSF_LINUX_APPLET_SYS_SELECT_IMP(...) \
75 VSF_APPLET_VPLT_ENTRY_FUNC_IMP(VSF_LINUX_APPLET_SYS_SELECT_VPLT, __VA_ARGS__)
79 return VSF_LINUX_APPLET_SYS_SELECT_ENTRY(
select)(nfds, readfds, writefds, exceptfds,
timeout);
83 return VSF_LINUX_APPLET_SYS_SELECT_ENTRY(
pselect)(nfds, readfds, writefds, exceptfds, timeout_ts, sigmask);
uint_fast8_t uintalu_t
Definition type.h:88
__le16 timeout
Definition ieee80211.h:94
uintalu_t fd_mask
Definition select.h:41
#define select
Definition select.h:21
__VSF_VPLT_DECORATOR__ vsf_linux_sys_select_vplt_t vsf_linux_sys_select_vplt
Definition vsf_linux_fs.c:3652
#define FD_SETSIZE
Definition select.h:32
#define NFDBITS
Definition select.h:39
int pselect(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, const struct timespec *timeout_ts, const sigset_t *sigmask)
Definition vsf_linux_fs.c:1355
fd_mask fds_bits[(FD_SETSIZE+NFDBITS - 1)/NFDBITS]
Definition select.h:43
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(pselect)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(select)
vsf_vplt_info_t info
Definition select.h:49
#define __VSF_VPLT_DECORATOR__
Definition vsf_cfg.h:93
#define VSF_APPLET_VPLT_ENTRY_FUNC_TRACE()
Definition vsf_cfg.h:165