#include <sys/_types/_fd_def.h>
sys/_types/_fd_def.h
macro_FD_SET
#define _FD_SET
typedeffd_set
typedef struct fd_set fd_set;
function__darwin_check_fd_set_overflow
__API_AVAILABLE(macosx(11.0), ios(14.0), tvos(14.0), watchos(7.0))
int __darwin_check_fd_set_overflow(int, const void *, int)function__darwin_check_fd_set
__header_always_inline
int __darwin_check_fd_set(int _a, const void *_b)function__darwin_fd_isset
__header_always_inline int __darwin_fd_isset(int _fd, const struct fd_set *_p)
This inline avoids argument side-effect issues with FD_ISSET()
▾
claude-fable-5, 2026-08-23 · not from Apple sources · verified against xnu bsd/sys/_types/_fd_def.h
Inline implementation of the FD_ISSET() macro. Returns nonzero if descriptor _fd is a member of the set pointed to by _p, testing the corresponding bit (_fd modulo __DARWIN_NFDBITS) in the appropriate fds_bits word. Provided as a function to avoid argument side-effect issues in the macro. User-space builds first bounds-check the descriptor with __darwin_check_fd_set; the kernel build performs the raw bit test.
function__darwin_fd_set
__header_always_inline void __darwin_fd_set(int _fd, struct fd_set *const _p)
▾
claude-fable-5, 2026-08-23 · not from Apple sources · verified against xnu bsd/sys/_types/_fd_def.h
Inline implementation of the FD_SET() macro. Sets the bit for descriptor _fd in the set pointed to by _p, marking it a member of the set. User-space builds first bounds-check the descriptor with __darwin_check_fd_set; the kernel build performs the raw bit operation.
function__darwin_fd_clr
__header_always_inline void __darwin_fd_clr(int _fd, struct fd_set *const _p)
▾
claude-fable-5, 2026-08-23 · not from Apple sources · verified against xnu bsd/sys/_types/_fd_def.h
Inline implementation of the FD_CLR() macro. Clears the bit for descriptor _fd in the set pointed to by _p, removing it from the set. User-space builds first bounds-check the descriptor with __darwin_check_fd_set; the kernel build performs the raw bit operation.