summaryrefslogtreecommitdiff
path: root/Cython/Includes/posix/select.pxd
blob: 803c492d40fe95bde9a31ed7c68ac9f665d39651 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_select.h.html

from .types cimport sigset_t
from .time cimport timeval, timespec

cdef extern from "<sys/select.h>" nogil:
    ctypedef struct fd_set:
        pass

    int FD_SETSIZE
    void FD_SET(int, fd_set*)
    void FD_CLR(int, fd_set*)
    bint FD_ISSET(int, fd_set*)
    void FD_ZERO(fd_set*)

    int select(int nfds, fd_set *readfds, fd_set *writefds,
        fd_set *exceptfds, timeval *timeout)

    int pselect(int nfds, fd_set *readfds, fd_set *writefds,
        fd_set *exceptfds, const timespec *timeout,
        const sigset_t *sigmask)