ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev.c
(Generate patch)

Comparing libev/ev.c (file contents):
Revision 1.431 by root, Wed May 9 16:51:33 2012 UTC vs.
Revision 1.435 by root, Sat May 26 08:52:09 2012 UTC

1105#endif 1105#endif
1106 1106
1107static void (*syserr_cb)(const char *msg) EV_THROW; 1107static void (*syserr_cb)(const char *msg) EV_THROW;
1108 1108
1109void ecb_cold 1109void ecb_cold
1110ev_set_syserr_cb (void (*cb)(const char *msg)) EV_THROW 1110ev_set_syserr_cb (void (*cb)(const char *msg) EV_THROW) EV_THROW
1111{ 1111{
1112 syserr_cb = cb; 1112 syserr_cb = cb;
1113} 1113}
1114 1114
1115static void noinline ecb_cold 1115static void noinline ecb_cold
1133 abort (); 1133 abort ();
1134 } 1134 }
1135} 1135}
1136 1136
1137static void * 1137static void *
1138ev_realloc_emul (void *ptr, long size) 1138ev_realloc_emul (void *ptr, long size) EV_THROW
1139{ 1139{
1140#if __GLIBC__ 1140#if __GLIBC__
1141 return realloc (ptr, size); 1141 return realloc (ptr, size);
1142#else 1142#else
1143 /* some systems, notably openbsd and darwin, fail to properly 1143 /* some systems, notably openbsd and darwin, fail to properly
1154} 1154}
1155 1155
1156static void *(*alloc)(void *ptr, long size) EV_THROW = ev_realloc_emul; 1156static void *(*alloc)(void *ptr, long size) EV_THROW = ev_realloc_emul;
1157 1157
1158void ecb_cold 1158void ecb_cold
1159ev_set_allocator (void *(*cb)(void *ptr, long size)) EV_THROW 1159ev_set_allocator (void *(*cb)(void *ptr, long size) EV_THROW) EV_THROW
1160{ 1160{
1161 alloc = cb; 1161 alloc = cb;
1162} 1162}
1163 1163
1164inline_speed void * 1164inline_speed void *
1910 { 1910 {
1911 char dummy[4]; 1911 char dummy[4];
1912#ifdef _WIN32 1912#ifdef _WIN32
1913 WSABUF buf; 1913 WSABUF buf;
1914 DWORD recvd; 1914 DWORD recvd;
1915 DWORD flags = 0;
1915 buf.buf = dummy; 1916 buf.buf = dummy;
1916 buf.len = sizeof (dummy); 1917 buf.len = sizeof (dummy);
1917 WSARecv (EV_FD_TO_WIN32_HANDLE (evpipe [0]), &buf, 1, &recvd, 0, 0, 0); 1918 WSARecv (EV_FD_TO_WIN32_HANDLE (evpipe [0]), &buf, 1, &recvd, &flags, 0, 0);
1918#else 1919#else
1919 read (evpipe [0], &dummy, sizeof (dummy)); 1920 read (evpipe [0], &dummy, sizeof (dummy));
1920#endif 1921#endif
1921 } 1922 }
1922 } 1923 }
2354 EV_INVOKE_PENDING; 2355 EV_INVOKE_PENDING;
2355 } 2356 }
2356#endif 2357#endif
2357 2358
2358#if EV_CHILD_ENABLE 2359#if EV_CHILD_ENABLE
2359 if (ev_is_active (&childev)) 2360 if (ev_is_default_loop (EV_A) && ev_is_active (&childev))
2360 { 2361 {
2361 ev_ref (EV_A); /* child watcher */ 2362 ev_ref (EV_A); /* child watcher */
2362 ev_signal_stop (EV_A_ &childev); 2363 ev_signal_stop (EV_A_ &childev);
2363 } 2364 }
2364#endif 2365#endif
2811{ 2812{
2812 EV_FREQUENT_CHECK; 2813 EV_FREQUENT_CHECK;
2813 2814
2814 while (periodiccnt && ANHE_at (periodics [HEAP0]) < ev_rt_now) 2815 while (periodiccnt && ANHE_at (periodics [HEAP0]) < ev_rt_now)
2815 { 2816 {
2816 int feed_count = 0;
2817
2818 do 2817 do
2819 { 2818 {
2820 ev_periodic *w = (ev_periodic *)ANHE_w (periodics [HEAP0]); 2819 ev_periodic *w = (ev_periodic *)ANHE_w (periodics [HEAP0]);
2821 2820
2822 /*assert (("libev: inactive timer on periodic heap detected", ev_is_active (w)));*/ 2821 /*assert (("libev: inactive timer on periodic heap detected", ev_is_active (w)));*/

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines