… | |
… | |
388 | { |
388 | { |
389 | syserr_cb = cb; |
389 | syserr_cb = cb; |
390 | } |
390 | } |
391 | |
391 | |
392 | static void noinline |
392 | static void noinline |
393 | syserr (const char *msg) |
393 | ev_syserr (const char *msg) |
394 | { |
394 | { |
395 | if (!msg) |
395 | if (!msg) |
396 | msg = "(libev) system error"; |
396 | msg = "(libev) system error"; |
397 | |
397 | |
398 | if (syserr_cb) |
398 | if (syserr_cb) |
… | |
… | |
450 | { |
450 | { |
451 | WL head; |
451 | WL head; |
452 | unsigned char events; |
452 | unsigned char events; |
453 | unsigned char reify; |
453 | unsigned char reify; |
454 | unsigned char emask; /* the epoll backend stores the actual kernel mask in here */ |
454 | unsigned char emask; /* the epoll backend stores the actual kernel mask in here */ |
|
|
455 | unsigned char unused; |
|
|
456 | #if EV_USE_EPOLL |
455 | unsigned char egen; /* generation counter to counter epoll bugs */ |
457 | unsigned int egen; /* generation counter to counter epoll bugs */ |
|
|
458 | #endif |
456 | #if EV_SELECT_IS_WINSOCKET |
459 | #if EV_SELECT_IS_WINSOCKET |
457 | SOCKET handle; |
460 | SOCKET handle; |
458 | #endif |
461 | #endif |
459 | } ANFD; |
462 | } ANFD; |
460 | |
463 | |
… | |
… | |
998 | } |
1001 | } |
999 | else |
1002 | else |
1000 | #endif |
1003 | #endif |
1001 | { |
1004 | { |
1002 | while (pipe (evpipe)) |
1005 | while (pipe (evpipe)) |
1003 | syserr ("(libev) error creating signal/async pipe"); |
1006 | ev_syserr ("(libev) error creating signal/async pipe"); |
1004 | |
1007 | |
1005 | fd_intern (evpipe [0]); |
1008 | fd_intern (evpipe [0]); |
1006 | fd_intern (evpipe [1]); |
1009 | fd_intern (evpipe [1]); |
1007 | ev_io_set (&pipeev, evpipe [0], EV_READ); |
1010 | ev_io_set (&pipeev, evpipe [0], EV_READ); |
1008 | } |
1011 | } |
… | |
… | |
1656 | { |
1659 | { |
1657 | #if EV_MULTIPLICITY |
1660 | #if EV_MULTIPLICITY |
1658 | struct ev_loop *loop = ev_default_loop_ptr; |
1661 | struct ev_loop *loop = ev_default_loop_ptr; |
1659 | #endif |
1662 | #endif |
1660 | |
1663 | |
1661 | if (backend) |
1664 | ev_loop_fork (EV_A); |
1662 | postfork = 1; /* must be in line with ev_loop_fork */ |
|
|
1663 | } |
1665 | } |
1664 | |
1666 | |
1665 | /*****************************************************************************/ |
1667 | /*****************************************************************************/ |
1666 | |
1668 | |
1667 | void |
1669 | void |