… | |
… | |
751 | #endif |
751 | #endif |
752 | #if EV_USE_SELECT |
752 | #if EV_USE_SELECT |
753 | if (!method && (methods & EVMETHOD_SELECT)) method = select_init (EV_A_ methods); |
753 | if (!method && (methods & EVMETHOD_SELECT)) method = select_init (EV_A_ methods); |
754 | #endif |
754 | #endif |
755 | |
755 | |
756 | ev_watcher_init (&sigev, sigcb); |
756 | ev_init (&sigev, sigcb); |
757 | ev_set_priority (&sigev, EV_MAXPRI); |
757 | ev_set_priority (&sigev, EV_MAXPRI); |
758 | } |
758 | } |
759 | } |
759 | } |
760 | |
760 | |
761 | void |
761 | void |
… | |
… | |
1564 | else |
1564 | else |
1565 | { |
1565 | { |
1566 | once->cb = cb; |
1566 | once->cb = cb; |
1567 | once->arg = arg; |
1567 | once->arg = arg; |
1568 | |
1568 | |
1569 | ev_watcher_init (&once->io, once_cb_io); |
1569 | ev_init (&once->io, once_cb_io); |
1570 | if (fd >= 0) |
1570 | if (fd >= 0) |
1571 | { |
1571 | { |
1572 | ev_io_set (&once->io, fd, events); |
1572 | ev_io_set (&once->io, fd, events); |
1573 | ev_io_start (EV_A_ &once->io); |
1573 | ev_io_start (EV_A_ &once->io); |
1574 | } |
1574 | } |
1575 | |
1575 | |
1576 | ev_watcher_init (&once->to, once_cb_to); |
1576 | ev_init (&once->to, once_cb_to); |
1577 | if (timeout >= 0.) |
1577 | if (timeout >= 0.) |
1578 | { |
1578 | { |
1579 | ev_timer_set (&once->to, timeout, 0.); |
1579 | ev_timer_set (&once->to, timeout, 0.); |
1580 | ev_timer_start (EV_A_ &once->to); |
1580 | ev_timer_start (EV_A_ &once->to); |
1581 | } |
1581 | } |