ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev.c
(Generate patch)

Comparing libev/ev.c (file contents):
Revision 1.519 by root, Sat Dec 28 07:37:07 2019 UTC vs.
Revision 1.522 by root, Tue Dec 31 06:02:28 2019 UTC

2580 upheap (heap, i + HEAP0); 2580 upheap (heap, i + HEAP0);
2581} 2581}
2582 2582
2583/*****************************************************************************/ 2583/*****************************************************************************/
2584 2584
2585/* associate signal watchers to a signal signal */ 2585/* associate signal watchers to a signal */
2586typedef struct 2586typedef struct
2587{ 2587{
2588 EV_ATOMIC_T pending; 2588 EV_ATOMIC_T pending;
2589#if EV_MULTIPLICITY 2589#if EV_MULTIPLICITY
2590 EV_P; 2590 EV_P;
3001unsigned int 3001unsigned int
3002ev_supported_backends (void) EV_NOEXCEPT 3002ev_supported_backends (void) EV_NOEXCEPT
3003{ 3003{
3004 unsigned int flags = 0; 3004 unsigned int flags = 0;
3005 3005
3006 if (EV_USE_PORT ) flags |= EVBACKEND_PORT; 3006 if (EV_USE_PORT ) flags |= EVBACKEND_PORT;
3007 if (EV_USE_KQUEUE ) flags |= EVBACKEND_KQUEUE; 3007 if (EV_USE_KQUEUE ) flags |= EVBACKEND_KQUEUE;
3008 if (EV_USE_EPOLL ) flags |= EVBACKEND_EPOLL; 3008 if (EV_USE_EPOLL ) flags |= EVBACKEND_EPOLL;
3009 if (EV_USE_LINUXAIO) flags |= EVBACKEND_LINUXAIO; 3009 if (EV_USE_LINUXAIO ) flags |= EVBACKEND_LINUXAIO;
3010 if (EV_USE_IOURING ) flags |= EVBACKEND_IOURING; 3010 if (EV_USE_IOURING && ev_linux_version () >= 0x050601) flags |= EVBACKEND_IOURING; /* 5.6.1+ */
3011 if (EV_USE_POLL ) flags |= EVBACKEND_POLL; 3011 if (EV_USE_POLL ) flags |= EVBACKEND_POLL;
3012 if (EV_USE_SELECT ) flags |= EVBACKEND_SELECT; 3012 if (EV_USE_SELECT ) flags |= EVBACKEND_SELECT;
3013 3013
3014 return flags; 3014 return flags;
3015} 3015}
3016 3016
3017ecb_cold 3017ecb_cold
3018unsigned int 3018unsigned int
3048 3048
3049ecb_cold 3049ecb_cold
3050unsigned int 3050unsigned int
3051ev_embeddable_backends (void) EV_NOEXCEPT 3051ev_embeddable_backends (void) EV_NOEXCEPT
3052{ 3052{
3053 int flags = EVBACKEND_EPOLL | EVBACKEND_KQUEUE | EVBACKEND_PORT; 3053 int flags = EVBACKEND_EPOLL | EVBACKEND_KQUEUE | EVBACKEND_PORT | EVBACKEND_IOURING;
3054 3054
3055 /* epoll embeddability broken on all linux versions up to at least 2.6.23 */ 3055 /* epoll embeddability broken on all linux versions up to at least 2.6.23 */
3056 if (ev_linux_version () < 0x020620) /* disable it on linux < 2.6.32 */ 3056 if (ev_linux_version () < 0x020620) /* disable it on linux < 2.6.32 */
3057 flags &= ~EVBACKEND_EPOLL; 3057 flags &= ~EVBACKEND_EPOLL;
3058 3058
3059 /* EVBACKEND_LINUXAIO is theoretically embeddable, but suffers from a performance overhead */ 3059 /* EVBACKEND_LINUXAIO is theoretically embeddable, but suffers from a performance overhead */
3060
3061 /* EVBACKEND_IOURING is practically embeddable, but the current implementation is not
3062 * because our backend_fd is the epoll fd we need as fallback.
3063 * if the kernel ever is fixed, this might change...
3064 */
3065 3060
3066 return flags; 3061 return flags;
3067} 3062}
3068 3063
3069unsigned int 3064unsigned int

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines