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

Comparing libev/ev.c (file contents):
Revision 1.79 by root, Fri Nov 9 15:15:20 2007 UTC vs.
Revision 1.80 by root, Fri Nov 9 15:30:59 2007 UTC

215 int events; 215 int events;
216} ANPENDING; 216} ANPENDING;
217 217
218#if EV_MULTIPLICITY 218#if EV_MULTIPLICITY
219 219
220struct ev_loop 220 struct ev_loop
221{ 221 {
222# define VAR(name,decl) decl; 222 #define VAR(name,decl) decl;
223# include "ev_vars.h" 223 #include "ev_vars.h"
224};
225# undef VAR 224 #undef VAR
225 };
226# include "ev_wrap.h" 226 #include "ev_wrap.h"
227
228 struct ev_loop default_loop_struct;
229 static struct ev_loop *default_loop;
227 230
228#else 231#else
229 232
230# define VAR(name,decl) static decl; 233 #define VAR(name,decl) static decl;
231# include "ev_vars.h" 234 #include "ev_vars.h"
232# undef VAR 235 #undef VAR
236
237 static int default_loop;
233 238
234#endif 239#endif
235 240
236/*****************************************************************************/ 241/*****************************************************************************/
237 242
561} 566}
562 567
563void 568void
564ev_feed_signal_event (EV_P_ int signum) 569ev_feed_signal_event (EV_P_ int signum)
565{ 570{
571 WL w;
572
566#if EV_MULTIPLICITY 573#if EV_MULTIPLICITY
567 assert (("feeding signal events is only supported in the default loop", loop == default_loop)); 574 assert (("feeding signal events is only supported in the default loop", loop == default_loop));
568#endif 575#endif
569 576
570 --signum; 577 --signum;
579} 586}
580 587
581static void 588static void
582sigcb (EV_P_ struct ev_io *iow, int revents) 589sigcb (EV_P_ struct ev_io *iow, int revents)
583{ 590{
584 WL w;
585 int signum; 591 int signum;
586 592
587#ifdef WIN32 593#ifdef WIN32
588 recv (sigpipe [0], &revents, 1, MSG_DONTWAIT); 594 recv (sigpipe [0], &revents, 1, MSG_DONTWAIT);
589#else 595#else
591#endif 597#endif
592 gotsig = 0; 598 gotsig = 0;
593 599
594 for (signum = signalmax; signum--; ) 600 for (signum = signalmax; signum--; )
595 if (signals [signum].gotsig) 601 if (signals [signum].gotsig)
596 sigevent (EV_A_ signum + 1); 602 ev_feed_signal_event (EV_A_ signum + 1);
597} 603}
598 604
599static void 605static void
600siginit (EV_P) 606siginit (EV_P)
601{ 607{
841} 847}
842 848
843#endif 849#endif
844 850
845#if EV_MULTIPLICITY 851#if EV_MULTIPLICITY
846struct ev_loop default_loop_struct;
847static struct ev_loop *default_loop;
848
849struct ev_loop * 852struct ev_loop *
850#else 853#else
851static int default_loop;
852
853int 854int
854#endif 855#endif
855ev_default_loop (int methods) 856ev_default_loop (int methods)
856{ 857{
857 if (sigpipe [0] == sigpipe [1]) 858 if (sigpipe [0] == sigpipe [1])

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines