… | |
… | |
421 | return 0; |
421 | return 0; |
422 | } |
422 | } |
423 | |
423 | |
424 | ev_io_init (EV_A_ &linuxaio_epoll_w, linuxaio_epoll_cb, backend_fd, EV_READ); |
424 | ev_io_init (EV_A_ &linuxaio_epoll_w, linuxaio_epoll_cb, backend_fd, EV_READ); |
425 | ev_io_start (EV_A_ &linuxaio_epoll_w); |
425 | ev_io_start (EV_A_ &linuxaio_epoll_w); |
|
|
426 | ev_unref (EV_A); /* watcher should not keep loop alive */ |
426 | #endif |
427 | #endif |
427 | |
428 | |
428 | backend_modify = linuxaio_modify; |
429 | backend_modify = linuxaio_modify; |
429 | backend_poll = linuxaio_poll; |
430 | backend_poll = linuxaio_poll; |
430 | |
431 | |
… | |
… | |
466 | ev_syserr ("(libev) linuxaio epoll_create"); |
467 | ev_syserr ("(libev) linuxaio epoll_create"); |
467 | |
468 | |
468 | ev_io_stop (EV_A_ &linuxaio_epoll_w); |
469 | ev_io_stop (EV_A_ &linuxaio_epoll_w); |
469 | ev_io_init (EV_A_ &linuxaio_epoll_w, linuxaio_epoll_cb, backend_fd, EV_READ); |
470 | ev_io_init (EV_A_ &linuxaio_epoll_w, linuxaio_epoll_cb, backend_fd, EV_READ); |
470 | ev_io_start (EV_A_ &linuxaio_epoll_w); |
471 | ev_io_start (EV_A_ &linuxaio_epoll_w); |
471 | ev_unref (EV_A); /* watcher should not keep loop alive */ |
|
|
472 | #endif |
472 | #endif |
473 | |
473 | |
474 | fd_rearm_all (EV_A); |
474 | fd_rearm_all (EV_A); |
475 | } |
475 | } |
476 | |
476 | |