… | |
… | |
507 | } |
507 | } |
508 | |
508 | |
509 | void |
509 | void |
510 | ev_feed_fd_event (EV_P_ int fd, int revents) |
510 | ev_feed_fd_event (EV_P_ int fd, int revents) |
511 | { |
511 | { |
|
|
512 | if (fd >= 0 && fd < anfdmax) |
512 | fd_event (EV_A_ fd, revents); |
513 | fd_event (EV_A_ fd, revents); |
513 | } |
514 | } |
514 | |
515 | |
515 | void inline_size |
516 | void inline_size |
516 | fd_reify (EV_P) |
517 | fd_reify (EV_P) |
517 | { |
518 | { |
… | |
… | |
1162 | if (backend) |
1163 | if (backend) |
1163 | postfork = 1; |
1164 | postfork = 1; |
1164 | } |
1165 | } |
1165 | |
1166 | |
1166 | /*****************************************************************************/ |
1167 | /*****************************************************************************/ |
|
|
1168 | |
|
|
1169 | void |
|
|
1170 | ev_invoke (EV_P_ void *w, int revents) |
|
|
1171 | { |
|
|
1172 | EV_CB_INVOKE ((W)w, revents); |
|
|
1173 | } |
1167 | |
1174 | |
1168 | void inline_speed |
1175 | void inline_speed |
1169 | call_pending (EV_P) |
1176 | call_pending (EV_P) |
1170 | { |
1177 | { |
1171 | int pri; |
1178 | int pri; |
… | |
… | |
1532 | pendings [ABSPRI (w)][w->pending - 1].w = 0; |
1539 | pendings [ABSPRI (w)][w->pending - 1].w = 0; |
1533 | w->pending = 0; |
1540 | w->pending = 0; |
1534 | } |
1541 | } |
1535 | } |
1542 | } |
1536 | |
1543 | |
1537 | void |
1544 | int |
1538 | ev_clear_pending (EV_P_ void *w, int invoke) |
1545 | ev_clear_pending (EV_P_ void *w) |
1539 | { |
1546 | { |
1540 | W w_ = (W)w; |
1547 | W w_ = (W)w; |
1541 | int pending = w_->pending; |
1548 | int pending = w_->pending; |
1542 | |
1549 | |
1543 | if (pending) |
1550 | if (!pending) |
1544 | { |
1551 | return 0; |
|
|
1552 | |
|
|
1553 | w_->pending = 0; |
1545 | ANPENDING *p = pendings [ABSPRI (w_)] + pending - 1; |
1554 | ANPENDING *p = pendings [ABSPRI (w_)] + pending - 1; |
1546 | |
|
|
1547 | w_->pending = 0; |
|
|
1548 | p->w = 0; |
1555 | p->w = 0; |
1549 | |
1556 | |
1550 | if (invoke) |
1557 | return p->events; |
1551 | EV_CB_INVOKE (w_, p->events); |
|
|
1552 | } |
|
|
1553 | } |
1558 | } |
1554 | |
1559 | |
1555 | void inline_size |
1560 | void inline_size |
1556 | pri_adjust (EV_P_ W w) |
1561 | pri_adjust (EV_P_ W w) |
1557 | { |
1562 | { |