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

Comparing libev/ev_linuxaio.c (file contents):
Revision 1.7 by root, Sat Jun 22 16:25:53 2019 UTC vs.
Revision 1.8 by root, Sat Jun 22 22:18:39 2019 UTC

255 ts.tv_nsec = (long)((timeout - ts.tv_sec) * 1e9); 255 ts.tv_nsec = (long)((timeout - ts.tv_sec) * 1e9);
256 256
257 res = ev_io_getevents (linuxaio_ctx, 1, 1, &ioev, &ts); 257 res = ev_io_getevents (linuxaio_ctx, 1, 1, &ioev, &ts);
258 258
259 if (res < 0) 259 if (res < 0)
260 ev_syserr ("(libev) io_getevents"); 260 ev_syserr ("(libev) linuxaio io_getevents");
261 else if (res) 261 else if (res)
262 { 262 {
263 /* at least one event received, handle it and any remaining ones in the ring buffer */ 263 /* at least one event received, handle it and any remaining ones in the ring buffer */
264 linuxaio_parse_events (EV_A_ &ioev, 1); 264 linuxaio_parse_events (EV_A_ &ioev, 1);
265 linuxaio_get_events_from_ring (EV_A); 265 linuxaio_get_events_from_ring (EV_A);
294 linuxaio_submitcnt -= submitted; 294 linuxaio_submitcnt -= submitted;
295 timeout = 0; 295 timeout = 0;
296 break; 296 break;
297 } 297 }
298 else 298 else
299 ev_syserr ("(libev) io_submit"); 299 ev_syserr ("(libev) linuxaio io_submit");
300 300
301 submitted += res; 301 submitted += res;
302 } 302 }
303 303
304 linuxaio_submitcnt = 0; 304 linuxaio_submitcnt = 0;
350 linuxaio_destroy (EV_A); 350 linuxaio_destroy (EV_A);
351 linuxaio_submitcnt = 0; /* all pointers were invalidated */ 351 linuxaio_submitcnt = 0; /* all pointers were invalidated */
352 352
353 linuxaio_ctx = 0; 353 linuxaio_ctx = 0;
354 while (ev_io_setup (EV_LINUXAIO_DEPTH, &linuxaio_ctx) < 0) 354 while (ev_io_setup (EV_LINUXAIO_DEPTH, &linuxaio_ctx) < 0)
355 ev_syserr ("(libev) io_setup"); 355 ev_syserr ("(libev) linuxaio io_setup");
356 356
357 fd_rearm_all (EV_A); 357 fd_rearm_all (EV_A);
358} 358}
359 359

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines