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

Comparing libev/ev.c (file contents):
Revision 1.268 by root, Mon Oct 27 13:39:18 2008 UTC vs.
Revision 1.272 by root, Mon Nov 3 12:17:40 2008 UTC

388{ 388{
389 syserr_cb = cb; 389 syserr_cb = cb;
390} 390}
391 391
392static void noinline 392static void noinline
393syserr (const char *msg) 393ev_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)
1662 postfork = 1; /* must be in line with ev_loop_fork */ 1664 postfork = 1; /* must be in line with ev_loop_fork */
1663} 1665}
1664 1666
1665/*****************************************************************************/ 1667/*****************************************************************************/
1666 1668
1667void 1669void
2430 if (w->wd < 0) 2432 if (w->wd < 0)
2431 { 2433 {
2432 ev_timer_start (EV_A_ &w->timer); /* this is not race-free, so we still need to recheck periodically */ 2434 ev_timer_start (EV_A_ &w->timer); /* this is not race-free, so we still need to recheck periodically */
2433 2435
2434 /* monitor some parent directory for speedup hints */ 2436 /* monitor some parent directory for speedup hints */
2435 /* note that exceeding the hardcoded limit is not a correctness issue, */ 2437 /* note that exceeding the hardcoded path limit is not a correctness issue, */
2436 /* but an efficiency issue only */ 2438 /* but an efficiency issue only */
2437 if ((errno == ENOENT || errno == EACCES) && strlen (w->path) < 4096) 2439 if ((errno == ENOENT || errno == EACCES) && strlen (w->path) < 4096)
2438 { 2440 {
2439 char path [4096]; 2441 char path [4096];
2440 strcpy (path, w->path); 2442 strcpy (path, w->path);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines