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

Comparing libev/ev.c (file contents):
Revision 1.68 by root, Mon Nov 5 20:19:00 2007 UTC vs.
Revision 1.72 by root, Tue Nov 6 16:09:37 2007 UTC

54 54
55#endif 55#endif
56 56
57#include <math.h> 57#include <math.h>
58#include <stdlib.h> 58#include <stdlib.h>
59#include <unistd.h>
60#include <fcntl.h> 59#include <fcntl.h>
61#include <signal.h>
62#include <stddef.h> 60#include <stddef.h>
63 61
64#include <stdio.h> 62#include <stdio.h>
65 63
66#include <assert.h> 64#include <assert.h>
67#include <errno.h> 65#include <errno.h>
68#include <sys/types.h> 66#include <sys/types.h>
67#include <time.h>
68
69#include <signal.h>
70
69#ifndef WIN32 71#ifndef WIN32
72# include <unistd.h>
73# include <sys/time.h>
70# include <sys/wait.h> 74# include <sys/wait.h>
71#endif 75#endif
72#include <sys/time.h>
73#include <time.h>
74
75/**/ 76/**/
76 77
77#ifndef EV_USE_MONOTONIC 78#ifndef EV_USE_MONOTONIC
78# define EV_USE_MONOTONIC 1 79# define EV_USE_MONOTONIC 1
79#endif 80#endif
94# define EV_USE_KQUEUE 0 95# define EV_USE_KQUEUE 0
95#endif 96#endif
96 97
97#ifndef EV_USE_WIN32 98#ifndef EV_USE_WIN32
98# ifdef WIN32 99# ifdef WIN32
100# define EV_USE_WIN32 0 /* it does not exist, use select */
101# undef EV_USE_SELECT
99# define EV_USE_WIN32 1 102# define EV_USE_SELECT 1
100# else 103# else
101# define EV_USE_WIN32 0 104# define EV_USE_WIN32 0
102# endif 105# endif
103#endif 106#endif
104 107
149 152
150#if WIN32 153#if WIN32
151/* note: the comment below could not be substantiated, but what would I care */ 154/* note: the comment below could not be substantiated, but what would I care */
152/* MSDN says this is required to handle SIGFPE */ 155/* MSDN says this is required to handle SIGFPE */
153volatile double SIGFPE_REQ = 0.0f; 156volatile double SIGFPE_REQ = 0.0f;
157
158static int
159ev_socketpair_tcp (int filedes [2])
160{
161 struct sockaddr_in addr = { 0 };
162 int addr_size = sizeof (addr);
163 SOCKET listener;
164 SOCKET sock [2] = { -1, -1 };
165
166 if ((listener = socket (AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET)
167 return -1;
168
169 addr.sin_family = AF_INET;
170 addr.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
171 addr.sin_port = 0;
172
173 if (bind (listener, (struct sockaddr *)&addr, addr_size))
174 goto fail;
175
176 if (getsockname(listener, (struct sockaddr *)&addr, &addr_size))
177 goto fail;
178
179 if (listen (listener, 1))
180 goto fail;
181
182 if ((sock [0] = socket (AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET)
183 goto fail;
184
185 if (connect (sock[0], (struct sockaddr *)&addr, addr_size))
186 goto fail;
187
188 if ((sock[1] = accept (listener, 0, 0)) < 0)
189 goto fail;
190
191 closesocket (listener);
192
193 filedes [0] = sock [0];
194 filedes [1] = sock [1];
195
196 return 0;
197
198fail:
199 closesocket (listener);
200
201 if (sock [0] != INVALID_SOCKET) closesocket (sock [0]);
202 if (sock [1] != INVALID_SOCKET) closesocket (sock [1]);
203
204 return -1;
205}
206
207# define ev_pipe(filedes) ev_socketpair_tcp (filedes)
208#else
209# define ev_pipe(filedes) pipe (filedes)
154#endif 210#endif
211
212/*****************************************************************************/
213
214static void (*syserr_cb)(const char *msg);
215
216void ev_set_syserr_cb (void (*cb)(const char *msg))
217{
218 syserr_cb = cb;
219}
220
221static void
222syserr (const char *msg)
223{
224 if (!msg)
225 msg = "(libev) system error";
226
227 if (syserr_cb)
228 syserr_cb (msg);
229 else
230 {
231 perror (msg);
232 abort ();
233 }
234}
235
236static void *(*alloc)(void *ptr, long size);
237
238void ev_set_allocator (void *(*cb)(void *ptr, long size))
239{
240 alloc = cb;
241}
242
243static void *
244ev_realloc (void *ptr, long size)
245{
246 ptr = alloc ? alloc (ptr, size) : realloc (ptr, size);
247
248 if (!ptr && size)
249 {
250 fprintf (stderr, "libev: cannot allocate %ld bytes, aborting.", size);
251 abort ();
252 }
253
254 return ptr;
255}
256
257#define ev_malloc(size) ev_realloc (0, (size))
258#define ev_free(ptr) ev_realloc ((ptr), 0)
155 259
156/*****************************************************************************/ 260/*****************************************************************************/
157 261
158typedef struct 262typedef struct
159{ 263{
223 return rt_now; 327 return rt_now;
224} 328}
225 329
226#define array_roundsize(base,n) ((n) | 4 & ~3) 330#define array_roundsize(base,n) ((n) | 4 & ~3)
227 331
228#define array_needsize(base,cur,cnt,init) \ 332#define array_needsize(base,cur,cnt,init) \
229 if (expect_false ((cnt) > cur)) \ 333 if (expect_false ((cnt) > cur)) \
230 { \ 334 { \
231 int newcnt = cur; \ 335 int newcnt = cur; \
232 do \ 336 do \
233 { \ 337 { \
234 newcnt = array_roundsize (base, newcnt << 1); \ 338 newcnt = array_roundsize (base, newcnt << 1); \
235 } \ 339 } \
236 while ((cnt) > newcnt); \ 340 while ((cnt) > newcnt); \
237 \ 341 \
238 base = realloc (base, sizeof (*base) * (newcnt)); \ 342 base = ev_realloc (base, sizeof (*base) * (newcnt)); \
239 init (base + cur, newcnt - cur); \ 343 init (base + cur, newcnt - cur); \
240 cur = newcnt; \ 344 cur = newcnt; \
241 } 345 }
242 346
243#define array_slim(stem) \ 347#define array_slim(stem) \
244 if (stem ## max < array_roundsize (stem ## cnt >> 2)) \ 348 if (stem ## max < array_roundsize (stem ## cnt >> 2)) \
245 { \ 349 { \
246 stem ## max = array_roundsize (stem ## cnt >> 1); \ 350 stem ## max = array_roundsize (stem ## cnt >> 1); \
247 base = realloc (base, sizeof (*base) * (stem ## max)); \ 351 base = ev_realloc (base, sizeof (*base) * (stem ## max)); \
248 fprintf (stderr, "slimmed down " # stem " to %d\n", stem ## max);/*D*/\ 352 fprintf (stderr, "slimmed down " # stem " to %d\n", stem ## max);/*D*/\
249 } 353 }
250 354
355/* microsoft's pseudo-c is quite far from C as the rest of the world and the standard knows it */
356/* bringing us everlasting joy in form of stupid extra macros that are not required in C */
357#define array_free_microshit(stem) \
358 ev_free (stem ## s); stem ## cnt = stem ## max = 0;
359
251#define array_free(stem, idx) \ 360#define array_free(stem, idx) \
252 free (stem ## s idx); stem ## cnt idx = stem ## max idx = 0; 361 ev_free (stem ## s idx); stem ## cnt idx = stem ## max idx = 0;
253 362
254/*****************************************************************************/ 363/*****************************************************************************/
255 364
256static void 365static void
257anfds_init (ANFD *base, int count) 366anfds_init (ANFD *base, int count)
274 pendings [ABSPRI (w)][w->pending - 1].events |= events; 383 pendings [ABSPRI (w)][w->pending - 1].events |= events;
275 return; 384 return;
276 } 385 }
277 386
278 w->pending = ++pendingcnt [ABSPRI (w)]; 387 w->pending = ++pendingcnt [ABSPRI (w)];
279 array_needsize (pendings [ABSPRI (w)], pendingmax [ABSPRI (w)], pendingcnt [ABSPRI (w)], ); 388 array_needsize (pendings [ABSPRI (w)], pendingmax [ABSPRI (w)], pendingcnt [ABSPRI (w)], (void));
280 pendings [ABSPRI (w)][w->pending - 1].w = w; 389 pendings [ABSPRI (w)][w->pending - 1].w = w;
281 pendings [ABSPRI (w)][w->pending - 1].events = events; 390 pendings [ABSPRI (w)][w->pending - 1].events = events;
282} 391}
283 392
284static void 393static void
333} 442}
334 443
335static void 444static void
336fd_change (EV_P_ int fd) 445fd_change (EV_P_ int fd)
337{ 446{
338 if (anfds [fd].reify || fdchangecnt < 0) 447 if (anfds [fd].reify)
339 return; 448 return;
340 449
341 anfds [fd].reify = 1; 450 anfds [fd].reify = 1;
342 451
343 ++fdchangecnt; 452 ++fdchangecnt;
344 array_needsize (fdchanges, fdchangemax, fdchangecnt, ); 453 array_needsize (fdchanges, fdchangemax, fdchangecnt, (void));
345 fdchanges [fdchangecnt - 1] = fd; 454 fdchanges [fdchangecnt - 1] = fd;
346} 455}
347 456
348static void 457static void
349fd_kill (EV_P_ int fd) 458fd_kill (EV_P_ int fd)
355 ev_io_stop (EV_A_ w); 464 ev_io_stop (EV_A_ w);
356 event (EV_A_ (W)w, EV_ERROR | EV_READ | EV_WRITE); 465 event (EV_A_ (W)w, EV_ERROR | EV_READ | EV_WRITE);
357 } 466 }
358} 467}
359 468
469static int
470fd_valid (int fd)
471{
472#ifdef WIN32
473 return !!win32_get_osfhandle (fd);
474#else
475 return fcntl (fd, F_GETFD) != -1;
476#endif
477}
478
360/* called on EBADF to verify fds */ 479/* called on EBADF to verify fds */
361static void 480static void
362fd_ebadf (EV_P) 481fd_ebadf (EV_P)
363{ 482{
364 int fd; 483 int fd;
365 484
366 for (fd = 0; fd < anfdmax; ++fd) 485 for (fd = 0; fd < anfdmax; ++fd)
367 if (anfds [fd].events) 486 if (anfds [fd].events)
368 if (fcntl (fd, F_GETFD) == -1 && errno == EBADF) 487 if (!fd_valid (fd) == -1 && errno == EBADF)
369 fd_kill (EV_A_ fd); 488 fd_kill (EV_A_ fd);
370} 489}
371 490
372/* called on ENOMEM in select/poll to kill some fds and retry */ 491/* called on ENOMEM in select/poll to kill some fds and retry */
373static void 492static void
381 fd_kill (EV_A_ fd); 500 fd_kill (EV_A_ fd);
382 return; 501 return;
383 } 502 }
384} 503}
385 504
386/* susually called after fork if method needs to re-arm all fds from scratch */ 505/* usually called after fork if method needs to re-arm all fds from scratch */
387static void 506static void
388fd_rearm_all (EV_P) 507fd_rearm_all (EV_P)
389{ 508{
390 int fd; 509 int fd;
391 510
522 ev_unref (EV_A); /* child watcher should not keep loop alive */ 641 ev_unref (EV_A); /* child watcher should not keep loop alive */
523} 642}
524 643
525/*****************************************************************************/ 644/*****************************************************************************/
526 645
646static struct ev_child *childs [PID_HASHSIZE];
647
527#ifndef WIN32 648#ifndef WIN32
528 649
529static struct ev_child *childs [PID_HASHSIZE];
530static struct ev_signal childev; 650static struct ev_signal childev;
531 651
532#ifndef WCONTINUED 652#ifndef WCONTINUED
533# define WCONTINUED 0 653# define WCONTINUED 0
534#endif 654#endif
648 if (!method && (methods & EVMETHOD_POLL )) method = poll_init (EV_A_ methods); 768 if (!method && (methods & EVMETHOD_POLL )) method = poll_init (EV_A_ methods);
649#endif 769#endif
650#if EV_USE_SELECT 770#if EV_USE_SELECT
651 if (!method && (methods & EVMETHOD_SELECT)) method = select_init (EV_A_ methods); 771 if (!method && (methods & EVMETHOD_SELECT)) method = select_init (EV_A_ methods);
652#endif 772#endif
773
774 ev_watcher_init (&sigev, sigcb);
775 ev_set_priority (&sigev, EV_MAXPRI);
653 } 776 }
654} 777}
655 778
656void 779void
657loop_destroy (EV_P) 780loop_destroy (EV_P)
675#endif 798#endif
676 799
677 for (i = NUMPRI; i--; ) 800 for (i = NUMPRI; i--; )
678 array_free (pending, [i]); 801 array_free (pending, [i]);
679 802
803 /* have to use the microsoft-never-gets-it-right macro */
680 array_free (fdchange, ); 804 array_free_microshit (fdchange);
681 array_free (timer, ); 805 array_free_microshit (timer);
682 array_free (periodic, ); 806 array_free_microshit (periodic);
683 array_free (idle, ); 807 array_free_microshit (idle);
684 array_free (prepare, ); 808 array_free_microshit (prepare);
685 array_free (check, ); 809 array_free_microshit (check);
686 810
687 method = 0; 811 method = 0;
688 /*TODO*/
689} 812}
690 813
691void 814static void
692loop_fork (EV_P) 815loop_fork (EV_P)
693{ 816{
694 /*TODO*/
695#if EV_USE_EPOLL 817#if EV_USE_EPOLL
696 if (method == EVMETHOD_EPOLL ) epoll_fork (EV_A); 818 if (method == EVMETHOD_EPOLL ) epoll_fork (EV_A);
697#endif 819#endif
698#if EV_USE_KQUEUE 820#if EV_USE_KQUEUE
699 if (method == EVMETHOD_KQUEUE) kqueue_fork (EV_A); 821 if (method == EVMETHOD_KQUEUE) kqueue_fork (EV_A);
700#endif 822#endif
823
824 if (ev_is_active (&sigev))
825 {
826 /* default loop */
827
828 ev_ref (EV_A);
829 ev_io_stop (EV_A_ &sigev);
830 close (sigpipe [0]);
831 close (sigpipe [1]);
832
833 while (ev_pipe (sigpipe))
834 syserr ("(libev) error creating pipe");
835
836 siginit (EV_A);
837 }
838
839 postfork = 0;
701} 840}
702 841
703#if EV_MULTIPLICITY 842#if EV_MULTIPLICITY
704struct ev_loop * 843struct ev_loop *
705ev_loop_new (int methods) 844ev_loop_new (int methods)
706{ 845{
707 struct ev_loop *loop = (struct ev_loop *)calloc (1, sizeof (struct ev_loop)); 846 struct ev_loop *loop = (struct ev_loop *)ev_malloc (sizeof (struct ev_loop));
847
848 memset (loop, 0, sizeof (struct ev_loop));
708 849
709 loop_init (EV_A_ methods); 850 loop_init (EV_A_ methods);
710 851
711 if (ev_method (EV_A)) 852 if (ev_method (EV_A))
712 return loop; 853 return loop;
716 857
717void 858void
718ev_loop_destroy (EV_P) 859ev_loop_destroy (EV_P)
719{ 860{
720 loop_destroy (EV_A); 861 loop_destroy (EV_A);
721 free (loop); 862 ev_free (loop);
722} 863}
723 864
724void 865void
725ev_loop_fork (EV_P) 866ev_loop_fork (EV_P)
726{ 867{
727 loop_fork (EV_A); 868 postfork = 1;
728} 869}
729 870
730#endif 871#endif
731 872
732#if EV_MULTIPLICITY 873#if EV_MULTIPLICITY
740int 881int
741#endif 882#endif
742ev_default_loop (int methods) 883ev_default_loop (int methods)
743{ 884{
744 if (sigpipe [0] == sigpipe [1]) 885 if (sigpipe [0] == sigpipe [1])
745 if (pipe (sigpipe)) 886 if (ev_pipe (sigpipe))
746 return 0; 887 return 0;
747 888
748 if (!default_loop) 889 if (!default_loop)
749 { 890 {
750#if EV_MULTIPLICITY 891#if EV_MULTIPLICITY
755 896
756 loop_init (EV_A_ methods); 897 loop_init (EV_A_ methods);
757 898
758 if (ev_method (EV_A)) 899 if (ev_method (EV_A))
759 { 900 {
760 ev_watcher_init (&sigev, sigcb);
761 ev_set_priority (&sigev, EV_MAXPRI);
762 siginit (EV_A); 901 siginit (EV_A);
763 902
764#ifndef WIN32 903#ifndef WIN32
765 ev_signal_init (&childev, childcb, SIGCHLD); 904 ev_signal_init (&childev, childcb, SIGCHLD);
766 ev_set_priority (&childev, EV_MAXPRI); 905 ev_set_priority (&childev, EV_MAXPRI);
780{ 919{
781#if EV_MULTIPLICITY 920#if EV_MULTIPLICITY
782 struct ev_loop *loop = default_loop; 921 struct ev_loop *loop = default_loop;
783#endif 922#endif
784 923
924#ifndef WIN32
785 ev_ref (EV_A); /* child watcher */ 925 ev_ref (EV_A); /* child watcher */
786 ev_signal_stop (EV_A_ &childev); 926 ev_signal_stop (EV_A_ &childev);
927#endif
787 928
788 ev_ref (EV_A); /* signal watcher */ 929 ev_ref (EV_A); /* signal watcher */
789 ev_io_stop (EV_A_ &sigev); 930 ev_io_stop (EV_A_ &sigev);
790 931
791 close (sigpipe [0]); sigpipe [0] = 0; 932 close (sigpipe [0]); sigpipe [0] = 0;
799{ 940{
800#if EV_MULTIPLICITY 941#if EV_MULTIPLICITY
801 struct ev_loop *loop = default_loop; 942 struct ev_loop *loop = default_loop;
802#endif 943#endif
803 944
804 loop_fork (EV_A); 945 if (method)
805 946 postfork = 1;
806 ev_io_stop (EV_A_ &sigev);
807 close (sigpipe [0]);
808 close (sigpipe [1]);
809 pipe (sigpipe);
810
811 ev_ref (EV_A); /* signal watcher */
812 siginit (EV_A);
813} 947}
814 948
815/*****************************************************************************/ 949/*****************************************************************************/
816 950
817static void 951static void
995 { 1129 {
996 queue_events (EV_A_ (W *)prepares, preparecnt, EV_PREPARE); 1130 queue_events (EV_A_ (W *)prepares, preparecnt, EV_PREPARE);
997 call_pending (EV_A); 1131 call_pending (EV_A);
998 } 1132 }
999 1133
1134 /* we might have forked, so reify kernel state if necessary */
1135 if (expect_false (postfork))
1136 loop_fork (EV_A);
1137
1000 /* update fd-related kernel structures */ 1138 /* update fd-related kernel structures */
1001 fd_reify (EV_A); 1139 fd_reify (EV_A);
1002 1140
1003 /* calculate blocking time */ 1141 /* calculate blocking time */
1004 1142
1158 ((WT)w)->at += mn_now; 1296 ((WT)w)->at += mn_now;
1159 1297
1160 assert (("ev_timer_start called with negative timer repeat value", w->repeat >= 0.)); 1298 assert (("ev_timer_start called with negative timer repeat value", w->repeat >= 0.));
1161 1299
1162 ev_start (EV_A_ (W)w, ++timercnt); 1300 ev_start (EV_A_ (W)w, ++timercnt);
1163 array_needsize (timers, timermax, timercnt, ); 1301 array_needsize (timers, timermax, timercnt, (void));
1164 timers [timercnt - 1] = w; 1302 timers [timercnt - 1] = w;
1165 upheap ((WT *)timers, timercnt - 1); 1303 upheap ((WT *)timers, timercnt - 1);
1166 1304
1167 assert (("internal timer heap corruption", timers [((W)w)->active - 1] == w)); 1305 assert (("internal timer heap corruption", timers [((W)w)->active - 1] == w));
1168} 1306}
1215 /* this formula differs from the one in periodic_reify because we do not always round up */ 1353 /* this formula differs from the one in periodic_reify because we do not always round up */
1216 if (w->interval) 1354 if (w->interval)
1217 ((WT)w)->at += ceil ((rt_now - ((WT)w)->at) / w->interval) * w->interval; 1355 ((WT)w)->at += ceil ((rt_now - ((WT)w)->at) / w->interval) * w->interval;
1218 1356
1219 ev_start (EV_A_ (W)w, ++periodiccnt); 1357 ev_start (EV_A_ (W)w, ++periodiccnt);
1220 array_needsize (periodics, periodicmax, periodiccnt, ); 1358 array_needsize (periodics, periodicmax, periodiccnt, (void));
1221 periodics [periodiccnt - 1] = w; 1359 periodics [periodiccnt - 1] = w;
1222 upheap ((WT *)periodics, periodiccnt - 1); 1360 upheap ((WT *)periodics, periodiccnt - 1);
1223 1361
1224 assert (("internal periodic heap corruption", periodics [((W)w)->active - 1] == w)); 1362 assert (("internal periodic heap corruption", periodics [((W)w)->active - 1] == w));
1225} 1363}
1247{ 1385{
1248 if (ev_is_active (w)) 1386 if (ev_is_active (w))
1249 return; 1387 return;
1250 1388
1251 ev_start (EV_A_ (W)w, ++idlecnt); 1389 ev_start (EV_A_ (W)w, ++idlecnt);
1252 array_needsize (idles, idlemax, idlecnt, ); 1390 array_needsize (idles, idlemax, idlecnt, (void));
1253 idles [idlecnt - 1] = w; 1391 idles [idlecnt - 1] = w;
1254} 1392}
1255 1393
1256void 1394void
1257ev_idle_stop (EV_P_ struct ev_idle *w) 1395ev_idle_stop (EV_P_ struct ev_idle *w)
1269{ 1407{
1270 if (ev_is_active (w)) 1408 if (ev_is_active (w))
1271 return; 1409 return;
1272 1410
1273 ev_start (EV_A_ (W)w, ++preparecnt); 1411 ev_start (EV_A_ (W)w, ++preparecnt);
1274 array_needsize (prepares, preparemax, preparecnt, ); 1412 array_needsize (prepares, preparemax, preparecnt, (void));
1275 prepares [preparecnt - 1] = w; 1413 prepares [preparecnt - 1] = w;
1276} 1414}
1277 1415
1278void 1416void
1279ev_prepare_stop (EV_P_ struct ev_prepare *w) 1417ev_prepare_stop (EV_P_ struct ev_prepare *w)
1291{ 1429{
1292 if (ev_is_active (w)) 1430 if (ev_is_active (w))
1293 return; 1431 return;
1294 1432
1295 ev_start (EV_A_ (W)w, ++checkcnt); 1433 ev_start (EV_A_ (W)w, ++checkcnt);
1296 array_needsize (checks, checkmax, checkcnt, ); 1434 array_needsize (checks, checkmax, checkcnt, (void));
1297 checks [checkcnt - 1] = w; 1435 checks [checkcnt - 1] = w;
1298} 1436}
1299 1437
1300void 1438void
1301ev_check_stop (EV_P_ struct ev_check *w) 1439ev_check_stop (EV_P_ struct ev_check *w)
1395 void (*cb)(int revents, void *arg) = once->cb; 1533 void (*cb)(int revents, void *arg) = once->cb;
1396 void *arg = once->arg; 1534 void *arg = once->arg;
1397 1535
1398 ev_io_stop (EV_A_ &once->io); 1536 ev_io_stop (EV_A_ &once->io);
1399 ev_timer_stop (EV_A_ &once->to); 1537 ev_timer_stop (EV_A_ &once->to);
1400 free (once); 1538 ev_free (once);
1401 1539
1402 cb (revents, arg); 1540 cb (revents, arg);
1403} 1541}
1404 1542
1405static void 1543static void
1415} 1553}
1416 1554
1417void 1555void
1418ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revents, void *arg), void *arg) 1556ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revents, void *arg), void *arg)
1419{ 1557{
1420 struct ev_once *once = malloc (sizeof (struct ev_once)); 1558 struct ev_once *once = ev_malloc (sizeof (struct ev_once));
1421 1559
1422 if (!once) 1560 if (!once)
1423 cb (EV_ERROR | EV_READ | EV_WRITE | EV_TIMEOUT, arg); 1561 cb (EV_ERROR | EV_READ | EV_WRITE | EV_TIMEOUT, arg);
1424 else 1562 else
1425 { 1563 {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines