ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Glib-EV/EV.xs
(Generate patch)

Comparing Glib-EV/EV.xs (file contents):
Revision 1.4 by root, Sat Jan 31 09:49:55 2009 UTC vs.
Revision 1.5 by root, Mon Nov 1 22:23:31 2010 UTC

15} 15}
16 16
17static void 17static void
18timeout_cb (EV_P_ ev_timer *w, int revents) 18timeout_cb (EV_P_ ev_timer *w, int revents)
19{ 19{
20 ev_unloop (EV_A, EVUNLOOP_ONE); 20 ev_break (EV_A, EVBREAK_ONE);
21} 21}
22 22
23typedef struct 23typedef struct
24{ 24{
25 struct ev_io io; 25 struct ev_io io;
38 | (revents & EV_WRITE ? G_IO_OUT : 0)); 38 | (revents & EV_WRITE ? G_IO_OUT : 0));
39 39
40 if (!oev && s->pfd->revents) 40 if (!oev && s->pfd->revents)
41 ++*(s->got_events); 41 ++*(s->got_events);
42 42
43 ev_unloop (EV_A, EVUNLOOP_ONE); 43 ev_break (EV_A, EVBREAK_ONE);
44} 44}
45 45
46static gint 46static gint
47event_poll_func (GPollFD *fds, guint nfds, gint timeout) 47event_poll_func (GPollFD *fds, guint nfds, gint timeout)
48{ 48{
79 { 79 {
80 ev_timer_init (&to, timeout_cb, timeout * 1e-3, 0.); 80 ev_timer_init (&to, timeout_cb, timeout * 1e-3, 0.);
81 ev_timer_start (EV_DEFAULT, &to); 81 ev_timer_start (EV_DEFAULT, &to);
82 } 82 }
83 83
84 ev_loop (EV_DEFAULT, 0); 84 ev_run (EV_DEFAULT, 0);
85 85
86 if (timeout >= 0) 86 if (timeout >= 0)
87 ev_timer_stop (EV_DEFAULT, &to); 87 ev_timer_stop (EV_DEFAULT, &to);
88 88
89 for (n = 0; n < nfds; ++n) 89 for (n = 0; n < nfds; ++n)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines