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

Comparing EV/EV.xs (file contents):
Revision 1.121 by root, Wed Apr 15 17:49:26 2009 UTC vs.
Revision 1.124 by root, Mon Jun 29 18:46:52 2009 UTC

33 33
34/* 5.6.x */ 34/* 5.6.x */
35#ifndef SvRV_set 35#ifndef SvRV_set
36# define SvRV_set(a,b) SvRV ((a)) = (b) 36# define SvRV_set(a,b) SvRV ((a)) = (b)
37#endif 37#endif
38
39#if __GNUC__ >= 3
40# define expect(expr,value) __builtin_expect ((expr),(value))
41#else
42# define expect(expr,value) (expr)
43#endif
44
45#define expect_false(expr) expect ((expr) != 0, 0)
46#define expect_true(expr) expect ((expr) != 0, 1)
47 38
48#define e_loop(w) INT2PTR (struct ev_loop *, SvIVX ((w)->loop)) 39#define e_loop(w) INT2PTR (struct ev_loop *, SvIVX ((w)->loop))
49 40
50#define WFLAG_KEEPALIVE 1 41#define WFLAG_KEEPALIVE 1
51#define WFLAG_UNREFED 2 /* has been unref'ed */ 42#define WFLAG_UNREFED 2 /* has been unref'ed */
399 const_iv (EV_, MINPRI) 390 const_iv (EV_, MINPRI)
400 const_iv (EV_, MAXPRI) 391 const_iv (EV_, MAXPRI)
401 392
402 const_iv (EV_, UNDEF) 393 const_iv (EV_, UNDEF)
403 const_iv (EV_, NONE) 394 const_iv (EV_, NONE)
404 const_iv (EV_, TIMEOUT)
405 const_iv (EV_, READ) 395 const_iv (EV_, READ)
406 const_iv (EV_, WRITE) 396 const_iv (EV_, WRITE)
397 const_iv (EV_, IO)
398 const_iv (EV_, TIMEOUT)
399 const_iv (EV_, TIMER)
400 const_iv (EV_, PERIODIC)
407 const_iv (EV_, SIGNAL) 401 const_iv (EV_, SIGNAL)
402 const_iv (EV_, CHILD)
403 const_iv (EV_, STAT)
408 const_iv (EV_, IDLE) 404 const_iv (EV_, IDLE)
405 const_iv (EV_, PREPARE)
409 const_iv (EV_, CHECK) 406 const_iv (EV_, CHECK)
407 const_iv (EV_, EMBED)
408 const_iv (EV_, FORK)
409 const_iv (EV_, ASYNC)
410 const_iv (EV_, CUSTOM)
410 const_iv (EV_, ERROR) 411 const_iv (EV_, ERROR)
411 412
413 const_iv (EV, LOOP_NONBLOCK)
412 const_iv (EV, LOOP_ONESHOT) 414 const_iv (EV, LOOP_ONESHOT)
415
413 const_iv (EV, LOOP_NONBLOCK) 416 const_iv (EV, UNLOOP_CANCEL)
414 const_iv (EV, UNLOOP_ONE) 417 const_iv (EV, UNLOOP_ONE)
415 const_iv (EV, UNLOOP_ALL) 418 const_iv (EV, UNLOOP_ALL)
416 419
417 const_iv (EV, BACKEND_SELECT) 420 const_iv (EV, BACKEND_SELECT)
418 const_iv (EV, BACKEND_POLL) 421 const_iv (EV, BACKEND_POLL)
421 const_iv (EV, BACKEND_DEVPOLL) 424 const_iv (EV, BACKEND_DEVPOLL)
422 const_iv (EV, BACKEND_PORT) 425 const_iv (EV, BACKEND_PORT)
423 const_iv (EV, FLAG_AUTO) 426 const_iv (EV, FLAG_AUTO)
424 const_iv (EV, FLAG_NOENV) 427 const_iv (EV, FLAG_NOENV)
425 const_iv (EV, FLAG_FORKCHECK) 428 const_iv (EV, FLAG_FORKCHECK)
429
430 const_iv (EV_, VERSION_MAJOR)
431 const_iv (EV_, VERSION_MINOR)
426 }; 432 };
427 433
428 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; ) 434 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; )
429 newCONSTSUB (stash, (char *)civ->name, newSViv (civ->iv)); 435 newCONSTSUB (stash, (char *)civ->name, newSViv (civ->iv));
430 436
461 evapi.loop_destroy = ev_loop_destroy; 467 evapi.loop_destroy = ev_loop_destroy;
462 evapi.loop_fork = ev_loop_fork; 468 evapi.loop_fork = ev_loop_fork;
463 evapi.loop_count = ev_loop_count; 469 evapi.loop_count = ev_loop_count;
464 evapi.now = ev_now; 470 evapi.now = ev_now;
465 evapi.now_update = ev_now_update; 471 evapi.now_update = ev_now_update;
472 evapi.suspend = ev_suspend;
473 evapi.resume = ev_resume;
466 evapi.backend = ev_backend; 474 evapi.backend = ev_backend;
467 evapi.unloop = ev_unloop; 475 evapi.unloop = ev_unloop;
468 evapi.ref = ev_ref; 476 evapi.ref = ev_ref;
469 evapi.unref = ev_unref; 477 evapi.unref = ev_unref;
470 evapi.loop = ev_loop; 478 evapi.loop = ev_loop;
546 C_ARGS: evapi.default_loop 554 C_ARGS: evapi.default_loop
547 555
548void ev_now_update () 556void ev_now_update ()
549 C_ARGS: evapi.default_loop 557 C_ARGS: evapi.default_loop
550 558
559void ev_suspend ()
560 C_ARGS: evapi.default_loop
561
562void ev_resume ()
563 C_ARGS: evapi.default_loop
564
551unsigned int ev_backend () 565unsigned int ev_backend ()
552 C_ARGS: evapi.default_loop 566 C_ARGS: evapi.default_loop
553 567
554unsigned int ev_loop_count () 568unsigned int ev_loop_count ()
555 C_ARGS: evapi.default_loop 569 C_ARGS: evapi.default_loop
1264 1278
1265NV ev_now (struct ev_loop *loop) 1279NV ev_now (struct ev_loop *loop)
1266 1280
1267void ev_now_update (struct ev_loop *loop) 1281void ev_now_update (struct ev_loop *loop)
1268 1282
1283void ev_suspend (struct ev_loop *loop)
1284
1285void ev_resume (struct ev_loop *loop)
1286
1269void ev_set_io_collect_interval (struct ev_loop *loop, NV interval) 1287void ev_set_io_collect_interval (struct ev_loop *loop, NV interval)
1270 1288
1271void ev_set_timeout_collect_interval (struct ev_loop *loop, NV interval) 1289void ev_set_timeout_collect_interval (struct ev_loop *loop, NV interval)
1272 1290
1273unsigned int ev_backend (struct ev_loop *loop) 1291unsigned int ev_backend (struct ev_loop *loop)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines