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

Comparing libev/event.c (file contents):
Revision 1.7 by root, Sat Nov 3 21:58:51 2007 UTC vs.
Revision 1.8 by root, Sat Nov 3 22:10:39 2007 UTC

33#include <stdlib.h> 33#include <stdlib.h>
34#include <sys/time.h> 34#include <sys/time.h>
35 35
36#include "event.h" 36#include "event.h"
37 37
38#ifdef EV_MULTIPLICITY
39# define dLOOPev struct ev_loop *loop = ev->ev_base->loop
40# define dLOOPbase struct ev_loop *loop = base->loop
41#else
38#define dLOOPev 42# define dLOOPev
39#define dLOOPbase 43# define dLOOPbase
44#endif
40 45
41struct event_base 46struct event_base
42{ 47{
48#ifdef EV_MULTIPLICITY
49 struct ev_loop *loop;
50#endif
43 int dummy; 51 int dummy;
44}; 52};
45 53
46static struct event_base x_base, *x_cur; 54static struct event_base x_base, *x_cur;
47 55
81 return 0; 89 return 0;
82} 90}
83 91
84void event_base_free (struct event_base *base) 92void event_base_free (struct event_base *base)
85{ 93{
94 dLOOPbase;
95
86 /* nop */ 96 /* nop */
87} 97}
88 98
89int event_dispatch (void) 99int event_dispatch (void)
90{ 100{
263} 273}
264 274
265int event_base_loop (struct event_base *base, int flags) 275int event_base_loop (struct event_base *base, int flags)
266{ 276{
267 dLOOPbase; 277 dLOOPbase;
268 ev_loop (EV_A_ flags | EVLOOP_ONESHOT); 278
279 ev_loop (EV_A_ flags);
269 280
270 return 0; 281 return 0;
271} 282}
272 283
273int event_base_dispatch (struct event_base *base) 284int event_base_dispatch (struct event_base *base)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines