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

Comparing libev/ev_iouring.c (file contents):
Revision 1.2 by root, Tue Jul 9 00:04:35 2019 UTC vs.
Revision 1.4 by root, Wed Aug 28 10:05:23 2019 UTC

574static void 574static void
575iouring_poll (EV_P_ ev_tstamp timeout) 575iouring_poll (EV_P_ ev_tstamp timeout)
576{ 576{
577 /* if we have events, no need for extra syscalls, but we might have to queue events */ 577 /* if we have events, no need for extra syscalls, but we might have to queue events */
578 if (iouring_handle_cq (EV_A)) 578 if (iouring_handle_cq (EV_A))
579 timeout = 0.; 579 timeout = EV_TS_CONST (0.);
580 else 580 else
581 /* no events, so maybe wait for some */ 581 /* no events, so maybe wait for some */
582 iouring_tfd_update (EV_A_ timeout); 582 iouring_tfd_update (EV_A_ timeout);
583 583
584 /* only enter the kernel if we have somethign to submit, or we need to wait */ 584 /* only enter the kernel if we have somethign to submit, or we need to wait */
587 int res; 587 int res;
588 588
589 EV_RELEASE_CB; 589 EV_RELEASE_CB;
590 590
591 res = evsys_io_uring_enter (iouring_fd, iouring_to_submit, 1, 591 res = evsys_io_uring_enter (iouring_fd, iouring_to_submit, 1,
592 timeout ? IORING_ENTER_GETEVENTS : 0, 0, 0); 592 timeout > EV_TS_CONST (0.) ? IORING_ENTER_GETEVENTS : 0, 0, 0);
593 iouring_to_submit = 0; 593 iouring_to_submit = 0;
594 594
595 EV_ACQUIRE_CB; 595 EV_ACQUIRE_CB;
596 596
597 if (ecb_expect_false (res < 0)) 597 if (ecb_expect_false (res < 0))
609iouring_init (EV_P_ int flags) 609iouring_init (EV_P_ int flags)
610{ 610{
611 if (!epoll_init (EV_A_ 0)) 611 if (!epoll_init (EV_A_ 0))
612 return 0; 612 return 0;
613 613
614 ev_io_init (EV_A_ &iouring_epoll_w, iouring_epoll_cb, backend_fd, EV_READ); 614 ev_io_init (&iouring_epoll_w, iouring_epoll_cb, backend_fd, EV_READ);
615 ev_set_priority (&iouring_epoll_w, EV_MAXPRI); 615 ev_set_priority (&iouring_epoll_w, EV_MAXPRI);
616 616
617 ev_io_init (&iouring_tfd_w, iouring_tfd_cb, iouring_tfd, EV_READ); 617 ev_io_init (&iouring_tfd_w, iouring_tfd_cb, iouring_tfd, EV_READ);
618 ev_set_priority (&iouring_tfd_w, EV_MAXPRI); 618 ev_set_priority (&iouring_tfd_w, EV_MAXPRI);
619 619

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines