… | |
… | |
149 | # define EV_SIGNAL_ENABLE 1 |
149 | # define EV_SIGNAL_ENABLE 1 |
150 | #endif |
150 | #endif |
151 | |
151 | |
152 | /*****************************************************************************/ |
152 | /*****************************************************************************/ |
153 | |
153 | |
154 | typedef double ev_tstamp; |
154 | #ifndef EV_TSTAMP_T |
|
|
155 | # define EV_TSTAMP_T double |
|
|
156 | #endif |
|
|
157 | typedef EV_TSTAMP_T ev_tstamp; |
155 | |
158 | |
156 | #include <string.h> /* for memmove */ |
159 | #include <string.h> /* for memmove */ |
157 | |
160 | |
158 | #ifndef EV_ATOMIC_T |
161 | #ifndef EV_ATOMIC_T |
159 | # include <signal.h> |
162 | # include <signal.h> |
… | |
… | |
499 | }; |
502 | }; |
500 | |
503 | |
501 | /* flag bits for ev_default_loop and ev_loop_new */ |
504 | /* flag bits for ev_default_loop and ev_loop_new */ |
502 | enum { |
505 | enum { |
503 | /* the default */ |
506 | /* the default */ |
504 | EVFLAG_AUTO = 0x00000000U, /* not quite a mask */ |
507 | EVFLAG_AUTO = 0x00000000U, /* not quite a mask */ |
505 | /* flag bits */ |
508 | /* flag bits */ |
506 | EVFLAG_NOENV = 0x01000000U, /* do NOT consult environment */ |
509 | EVFLAG_NOENV = 0x01000000U, /* do NOT consult environment */ |
507 | EVFLAG_FORKCHECK = 0x02000000U, /* check for a fork in each iteration */ |
510 | EVFLAG_FORKCHECK = 0x02000000U, /* check for a fork in each iteration */ |
508 | /* debugging/feature disable */ |
511 | /* debugging/feature disable */ |
509 | EVFLAG_NOINOTIFY = 0x00100000U, /* do not attempt to use inotify */ |
512 | EVFLAG_NOINOTIFY = 0x00100000U, /* do not attempt to use inotify */ |
510 | #if EV_COMPAT3 |
513 | #if EV_COMPAT3 |
511 | EVFLAG_NOSIGFD = 0, /* compatibility to pre-3.9 */ |
514 | EVFLAG_NOSIGFD = 0, /* compatibility to pre-3.9 */ |
512 | #endif |
515 | #endif |
513 | EVFLAG_SIGNALFD = 0x00200000U, /* attempt to use signalfd */ |
516 | EVFLAG_SIGNALFD = 0x00200000U, /* attempt to use signalfd */ |
514 | EVFLAG_NOSIGMASK = 0x00400000U /* avoid modifying the signal mask */ |
517 | EVFLAG_NOSIGMASK = 0x00400000U, /* avoid modifying the signal mask */ |
|
|
518 | EVFLAG_NOTIMERFD = 0x00800000U /* avoid creating a timerfd */ |
515 | }; |
519 | }; |
516 | |
520 | |
517 | /* method bits to be ored together */ |
521 | /* method bits to be ored together */ |
518 | enum { |
522 | enum { |
519 | EVBACKEND_SELECT = 0x00000001U, /* available just about anywhere */ |
523 | EVBACKEND_SELECT = 0x00000001U, /* available just about anywhere */ |
520 | EVBACKEND_POLL = 0x00000002U, /* !win, !aix, broken on osx */ |
524 | EVBACKEND_POLL = 0x00000002U, /* !win, !aix, broken on osx */ |
521 | EVBACKEND_EPOLL = 0x00000004U, /* linux */ |
525 | EVBACKEND_EPOLL = 0x00000004U, /* linux */ |
522 | EVBACKEND_KQUEUE = 0x00000008U, /* bsd, broken on osx */ |
526 | EVBACKEND_KQUEUE = 0x00000008U, /* bsd, broken on osx */ |
523 | EVBACKEND_DEVPOLL = 0x00000010U, /* solaris 8 */ /* NYI */ |
527 | EVBACKEND_DEVPOLL = 0x00000010U, /* solaris 8 */ /* NYI */ |
524 | EVBACKEND_PORT = 0x00000020U, /* solaris 10 */ |
528 | EVBACKEND_PORT = 0x00000020U, /* solaris 10 */ |
525 | EVBACKEND_LINUXAIO = 0x00000040U, /* Linuix AIO */ |
529 | EVBACKEND_LINUXAIO = 0x00000040U, /* linuix AIO, 4.19+ */ |
|
|
530 | EVBACKEND_IOURING = 0x00000080U, /* linux io_uring, 5.1+ */ |
526 | EVBACKEND_ALL = 0x0000007FU, /* all known backends */ |
531 | EVBACKEND_ALL = 0x000000FFU, /* all known backends */ |
527 | EVBACKEND_MASK = 0x0000FFFFU /* all future backends */ |
532 | EVBACKEND_MASK = 0x0000FFFFU /* all future backends */ |
528 | }; |
533 | }; |
529 | |
534 | |
530 | #if EV_PROTOTYPES |
535 | #if EV_PROTOTYPES |
531 | EV_API_DECL int ev_version_major (void) EV_NOEXCEPT; |
536 | EV_API_DECL int ev_version_major (void) EV_NOEXCEPT; |