… | |
… | |
847 | for (signum = signalmax; signum--; ) |
847 | for (signum = signalmax; signum--; ) |
848 | if (signals [signum].gotsig) |
848 | if (signals [signum].gotsig) |
849 | ev_feed_signal_event (EV_A_ signum + 1); |
849 | ev_feed_signal_event (EV_A_ signum + 1); |
850 | } |
850 | } |
851 | |
851 | |
|
|
852 | #if EV_ASYNC_ENABLE |
852 | if (gotasync) |
853 | if (gotasync) |
853 | { |
854 | { |
854 | int i; |
855 | int i; |
855 | gotasync = 0; |
856 | gotasync = 0; |
856 | |
857 | |
… | |
… | |
859 | { |
860 | { |
860 | asyncs [i]->sent = 0; |
861 | asyncs [i]->sent = 0; |
861 | ev_feed_event (EV_A_ asyncs [i], EV_ASYNC); |
862 | ev_feed_event (EV_A_ asyncs [i], EV_ASYNC); |
862 | } |
863 | } |
863 | } |
864 | } |
|
|
865 | #endif |
864 | } |
866 | } |
865 | |
867 | |
866 | /*****************************************************************************/ |
868 | /*****************************************************************************/ |
867 | |
869 | |
868 | static void |
870 | static void |
… | |
… | |
1079 | if (!clock_gettime (CLOCK_MONOTONIC, &ts)) |
1081 | if (!clock_gettime (CLOCK_MONOTONIC, &ts)) |
1080 | have_monotonic = 1; |
1082 | have_monotonic = 1; |
1081 | } |
1083 | } |
1082 | #endif |
1084 | #endif |
1083 | |
1085 | |
1084 | ev_rt_now = ev_time (); |
1086 | ev_rt_now = ev_time (); |
1085 | mn_now = get_clock (); |
1087 | mn_now = get_clock (); |
1086 | now_floor = mn_now; |
1088 | now_floor = mn_now; |
1087 | rtmn_diff = ev_rt_now - mn_now; |
1089 | rtmn_diff = ev_rt_now - mn_now; |
1088 | |
1090 | |
1089 | io_blocktime = 0.; |
1091 | io_blocktime = 0.; |
1090 | timeout_blocktime = 0.; |
1092 | timeout_blocktime = 0.; |
|
|
1093 | backend = 0; |
|
|
1094 | backend_fd = -1; |
|
|
1095 | gotasync = 0; |
|
|
1096 | #if EV_USE_INOTIFY |
|
|
1097 | fs_fd = -2; |
|
|
1098 | #endif |
1091 | |
1099 | |
1092 | /* pid check not overridable via env */ |
1100 | /* pid check not overridable via env */ |
1093 | #ifndef _WIN32 |
1101 | #ifndef _WIN32 |
1094 | if (flags & EVFLAG_FORKCHECK) |
1102 | if (flags & EVFLAG_FORKCHECK) |
1095 | curpid = getpid (); |
1103 | curpid = getpid (); |
… | |
… | |
1100 | && getenv ("LIBEV_FLAGS")) |
1108 | && getenv ("LIBEV_FLAGS")) |
1101 | flags = atoi (getenv ("LIBEV_FLAGS")); |
1109 | flags = atoi (getenv ("LIBEV_FLAGS")); |
1102 | |
1110 | |
1103 | if (!(flags & 0x0000ffffUL)) |
1111 | if (!(flags & 0x0000ffffUL)) |
1104 | flags |= ev_recommended_backends (); |
1112 | flags |= ev_recommended_backends (); |
1105 | |
|
|
1106 | backend = 0; |
|
|
1107 | backend_fd = -1; |
|
|
1108 | #if EV_USE_INOTIFY |
|
|
1109 | fs_fd = -2; |
|
|
1110 | #endif |
|
|
1111 | |
1113 | |
1112 | #if EV_USE_PORT |
1114 | #if EV_USE_PORT |
1113 | if (!backend && (flags & EVBACKEND_PORT )) backend = port_init (EV_A_ flags); |
1115 | if (!backend && (flags & EVBACKEND_PORT )) backend = port_init (EV_A_ flags); |
1114 | #endif |
1116 | #endif |
1115 | #if EV_USE_KQUEUE |
1117 | #if EV_USE_KQUEUE |
… | |
… | |
1187 | #if EV_FORK_ENABLE |
1189 | #if EV_FORK_ENABLE |
1188 | array_free (fork, EMPTY); |
1190 | array_free (fork, EMPTY); |
1189 | #endif |
1191 | #endif |
1190 | array_free (prepare, EMPTY); |
1192 | array_free (prepare, EMPTY); |
1191 | array_free (check, EMPTY); |
1193 | array_free (check, EMPTY); |
|
|
1194 | #if EV_ASYNC_ENABLE |
|
|
1195 | array_free (async, EMPTY); |
|
|
1196 | #endif |
1192 | |
1197 | |
1193 | backend = 0; |
1198 | backend = 0; |
1194 | } |
1199 | } |
1195 | |
1200 | |
1196 | void inline_size infy_fork (EV_P); |
1201 | void inline_size infy_fork (EV_P); |