@@ -578,7 +578,7 @@ iouring_poll (EV_P_ ev_tstamp timeout)
578
578
/* no events, so maybe wait for some */
579
579
iouring_tfd_update (EV_A_ timeout );
580
580
581
- /* only enter the kernel if we have somethign to submit, or we need to wait */
581
+ /* only enter the kernel if we have something to submit, or we need to wait */
582
582
if (timeout || iouring_to_submit )
583
583
{
584
584
int res ;
@@ -608,12 +608,6 @@ iouring_init (EV_P_ int flags)
608
608
if (!epoll_init (EV_A_ 0 ))
609
609
return 0 ;
610
610
611
- ev_io_init (& iouring_epoll_w , iouring_epoll_cb , backend_fd , EV_READ );
612
- ev_set_priority (& iouring_epoll_w , EV_MAXPRI );
613
-
614
- ev_io_init (& iouring_tfd_w , iouring_tfd_cb , iouring_tfd , EV_READ );
615
- ev_set_priority (& iouring_tfd_w , EV_MAXPRI );
616
-
617
611
iouring_entries = IOURING_INIT_ENTRIES ;
618
612
iouring_max_entries = 0 ;
619
613
@@ -623,6 +617,12 @@ iouring_init (EV_P_ int flags)
623
617
return 0 ;
624
618
}
625
619
620
+ ev_io_init (& iouring_epoll_w , iouring_epoll_cb , backend_fd , EV_READ );
621
+ ev_set_priority (& iouring_epoll_w , EV_MAXPRI );
622
+
623
+ ev_io_init (& iouring_tfd_w , iouring_tfd_cb , iouring_tfd , EV_READ );
624
+ ev_set_priority (& iouring_tfd_w , EV_MAXPRI );
625
+
626
626
ev_io_start (EV_A_ & iouring_epoll_w );
627
627
ev_unref (EV_A ); /* watcher should not keep loop alive */
628
628
0 commit comments