1 | /* |
1 | /* |
2 | * libev native API header |
2 | * libev native API header |
3 | * |
3 | * |
4 | * Copyright (c) 2007-2018 Marc Alexander Lehmann <libev@schmorp.de> |
4 | * Copyright (c) 2007-2019 Marc Alexander Lehmann <libev@schmorp.de> |
5 | * All rights reserved. |
5 | * All rights reserved. |
6 | * |
6 | * |
7 | * Redistribution and use in source and binary forms, with or without modifica- |
7 | * Redistribution and use in source and binary forms, with or without modifica- |
8 | * tion, are permitted provided that the following conditions are met: |
8 | * tion, are permitted provided that the following conditions are met: |
9 | * |
9 | * |
… | |
… | |
210 | #endif |
210 | #endif |
211 | |
211 | |
212 | /*****************************************************************************/ |
212 | /*****************************************************************************/ |
213 | |
213 | |
214 | #define EV_VERSION_MAJOR 4 |
214 | #define EV_VERSION_MAJOR 4 |
215 | #define EV_VERSION_MINOR 25 |
215 | #define EV_VERSION_MINOR 27 |
216 | |
216 | |
217 | /* eventmask, revents, events... */ |
217 | /* eventmask, revents, events... */ |
218 | enum { |
218 | enum { |
219 | EV_UNDEF = (int)0xFFFFFFFF, /* guaranteed to be invalid */ |
219 | EV_UNDEF = (int)0xFFFFFFFF, /* guaranteed to be invalid */ |
220 | EV_NONE = 0x00, /* no events */ |
220 | EV_NONE = 0x00, /* no events */ |
… | |
… | |
514 | EVFLAG_NOSIGMASK = 0x00400000U /* avoid modifying the signal mask */ |
514 | EVFLAG_NOSIGMASK = 0x00400000U /* avoid modifying the signal mask */ |
515 | }; |
515 | }; |
516 | |
516 | |
517 | /* method bits to be ored together */ |
517 | /* method bits to be ored together */ |
518 | enum { |
518 | enum { |
519 | EVBACKEND_SELECT = 0x00000001U, /* available just about anywhere */ |
519 | EVBACKEND_SELECT = 0x00000001U, /* available just about anywhere */ |
520 | EVBACKEND_POLL = 0x00000002U, /* !win, !aix, broken on osx */ |
520 | EVBACKEND_POLL = 0x00000002U, /* !win, !aix, broken on osx */ |
521 | EVBACKEND_EPOLL = 0x00000004U, /* linux */ |
521 | EVBACKEND_EPOLL = 0x00000004U, /* linux */ |
522 | EVBACKEND_KQUEUE = 0x00000008U, /* bsd, broken on osx */ |
522 | EVBACKEND_KQUEUE = 0x00000008U, /* bsd, broken on osx */ |
523 | EVBACKEND_DEVPOLL = 0x00000010U, /* solaris 8 */ /* NYI */ |
523 | EVBACKEND_DEVPOLL = 0x00000010U, /* solaris 8 */ /* NYI */ |
524 | EVBACKEND_PORT = 0x00000020U, /* solaris 10 */ |
524 | EVBACKEND_PORT = 0x00000020U, /* solaris 10 */ |
|
|
525 | EVBACKEND_LINUXAIO = 0x00000040U, /* linuix AIO, 4.19+ */ |
|
|
526 | EVBACKEND_IOURING = 0x00000080U, /* linux io_uring, 5.1+ */ |
525 | EVBACKEND_ALL = 0x0000003FU, /* all known backends */ |
527 | EVBACKEND_ALL = 0x000000FFU, /* all known backends */ |
526 | EVBACKEND_MASK = 0x0000FFFFU /* all future backends */ |
528 | EVBACKEND_MASK = 0x0000FFFFU /* all future backends */ |
527 | }; |
529 | }; |
528 | |
530 | |
529 | #if EV_PROTOTYPES |
531 | #if EV_PROTOTYPES |
530 | EV_API_DECL int ev_version_major (void) EV_NOEXCEPT; |
532 | EV_API_DECL int ev_version_major (void) EV_NOEXCEPT; |
531 | EV_API_DECL int ev_version_minor (void) EV_NOEXCEPT; |
533 | EV_API_DECL int ev_version_minor (void) EV_NOEXCEPT; |