ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/evthread.C
(Generate patch)

Comparing deliantra/server/server/evthread.C (file contents):
Revision 1.5 by root, Thu May 29 03:27:37 2008 UTC vs.
Revision 1.7 by root, Thu Nov 20 12:18:07 2008 UTC

83static EV_ATOMIC_T aio_pending; 83static EV_ATOMIC_T aio_pending;
84 84
85static void 85static void
86aio2_cb (EV_P_ ev_idle *w, int revents) 86aio2_cb (EV_P_ ev_idle *w, int revents)
87{ 87{
88 IV reqs;
89
88 CALL_BEGIN (0); 90 CALL_BEGIN (0);
89 CALL_CALL ("IO::AIO::poll_cb", G_SCALAR); 91 CALL_CALL ("IO::AIO::poll_cb", G_SCALAR);
90 92
91 fprintf (stderr, "pollcb %d\n", count ? TOPi : 0);//D 93 reqs = POPi;
92 if (count > 0 && TOPi < 0) 94 if (count > 0 && reqs < 0)
93 ev_idle_start (EV_A, w); 95 ev_idle_start (EV_A, w);
94 else 96 else
95 ev_idle_stop (EV_A, w); 97 ev_idle_stop (EV_A, w);
96 98
97 CALL_END; 99 CALL_END;
105 107
106static void 108static void
107aio1_cb (EV_P_ ev_io *w, int revents) 109aio1_cb (EV_P_ ev_io *w, int revents)
108{ 110{
109 char dummy; 111 char dummy;
110 ev_io_stop (EV_A, w);//D
111 return;
112 112
113 if (read (w->fd, &dummy, 1) > 0) 113 if (read (w->fd, &dummy, 1) > 0)
114 { 114 {
115 fprintf (stderr, "async\n");//D
116 ev_async_send (EV_DEFAULT_UC, &async_watcher); 115 ev_async_send (EV_DEFAULT_UC, &async_watcher);
117 coroapi::cede_pending = 1; 116 coroapi::cede_pending = 1;
118 } 117 }
119} 118}
120 119

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines