… | |
… | |
242 | |
242 | |
243 | for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; ) |
243 | for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; ) |
244 | newCONSTSUB (stash, (char *)civ->name, newSViv (civ->iv)); |
244 | newCONSTSUB (stash, (char *)civ->name, newSViv (civ->iv)); |
245 | |
245 | |
246 | stash_watcher = gv_stashpv ("EV::Watcher" , 1); |
246 | stash_watcher = gv_stashpv ("EV::Watcher" , 1); |
247 | stash_io = gv_stashpv ("EV::IO" , 1); |
247 | stash_io = gv_stashpv ("EV::Io" , 1); |
248 | stash_time = gv_stashpv ("EV::Time" , 1); |
248 | stash_time = gv_stashpv ("EV::Time" , 1); |
249 | stash_timer = gv_stashpv ("EV::Timer" , 1); |
249 | stash_timer = gv_stashpv ("EV::Timer" , 1); |
250 | stash_periodic = gv_stashpv ("EV::Periodic", 1); |
250 | stash_periodic = gv_stashpv ("EV::Periodic", 1); |
251 | stash_signal = gv_stashpv ("EV::Signal" , 1); |
251 | stash_signal = gv_stashpv ("EV::Signal" , 1); |
252 | stash_idle = gv_stashpv ("EV::Idle" , 1); |
252 | stash_idle = gv_stashpv ("EV::Idle" , 1); |
… | |
… | |
387 | evcheck_set (RETVAL); |
387 | evcheck_set (RETVAL); |
388 | if (!ix) evcheck_start (RETVAL); |
388 | if (!ix) evcheck_start (RETVAL); |
389 | OUTPUT: |
389 | OUTPUT: |
390 | RETVAL |
390 | RETVAL |
391 | |
391 | |
392 | struct ev_child *child (SV *cb, int pid) |
392 | struct ev_child *child (int pid, SV *cb) |
393 | ALIAS: |
393 | ALIAS: |
394 | check_ns = 1 |
394 | check_ns = 1 |
395 | CODE: |
395 | CODE: |
396 | RETVAL = e_new (sizeof (struct ev_check), cb); |
396 | RETVAL = e_new (sizeof (struct ev_check), cb); |
397 | evchild_set (RETVAL, pid); |
397 | evchild_set (RETVAL, pid); |
… | |
… | |
415 | sv_setsv (w->cb_sv, new_cb); |
415 | sv_setsv (w->cb_sv, new_cb); |
416 | } |
416 | } |
417 | OUTPUT: |
417 | OUTPUT: |
418 | RETVAL |
418 | RETVAL |
419 | |
419 | |
|
|
420 | void trigger (struct ev_watcher *w, int revents = EV_NONE) |
|
|
421 | CODE: |
|
|
422 | w->cb (w, revents); |
|
|
423 | |
420 | MODULE = EV PACKAGE = EV::IO PREFIX = evio_ |
424 | MODULE = EV PACKAGE = EV::Io PREFIX = evio_ |
421 | |
425 | |
422 | void evio_start (struct ev_io *w) |
426 | void evio_start (struct ev_io *w) |
423 | |
427 | |
424 | void evio_stop (struct ev_io *w) |
428 | void evio_stop (struct ev_io *w) |
|
|
429 | |
|
|
430 | void DESTROY (struct ev_io *w) |
|
|
431 | CODE: |
|
|
432 | evio_stop (w); |
425 | |
433 | |
426 | void set (struct ev_io *w, SV *fh, int events) |
434 | void set (struct ev_io *w, SV *fh, int events) |
427 | CODE: |
435 | CODE: |
428 | { |
436 | { |
429 | int active = w->active; |
437 | int active = w->active; |
… | |
… | |
476 | |
484 | |
477 | void evsignal_start (struct ev_signal *w) |
485 | void evsignal_start (struct ev_signal *w) |
478 | |
486 | |
479 | void evsignal_stop (struct ev_signal *w) |
487 | void evsignal_stop (struct ev_signal *w) |
480 | |
488 | |
|
|
489 | void DESTROY (struct ev_signal *w) |
|
|
490 | CODE: |
|
|
491 | evsignal_stop (w); |
|
|
492 | |
481 | void set (struct ev_signal *w, SV *signal = 0) |
493 | void set (struct ev_signal *w, SV *signal = 0) |
482 | CODE: |
494 | CODE: |
483 | { |
495 | { |
484 | Signal signum = sv_signum (signal); /* may croak here */ |
496 | Signal signum = sv_signum (signal); /* may croak here */ |
485 | int active = w->active; |
497 | int active = w->active; |
… | |
… | |
500 | void evtimer_stop (struct ev_timer *w) |
512 | void evtimer_stop (struct ev_timer *w) |
501 | |
513 | |
502 | void evtimer_again (struct ev_timer *w) |
514 | void evtimer_again (struct ev_timer *w) |
503 | INIT: |
515 | INIT: |
504 | CHECK_REPEAT (w->repeat); |
516 | CHECK_REPEAT (w->repeat); |
|
|
517 | |
|
|
518 | void DESTROY (struct ev_timer *w) |
|
|
519 | CODE: |
|
|
520 | evtimer_stop (w); |
505 | |
521 | |
506 | void set (struct ev_timer *w, NV after, NV repeat = 0.) |
522 | void set (struct ev_timer *w, NV after, NV repeat = 0.) |
507 | INIT: |
523 | INIT: |
508 | CHECK_REPEAT (repeat); |
524 | CHECK_REPEAT (repeat); |
509 | CODE: |
525 | CODE: |
… | |
… | |
520 | INIT: |
536 | INIT: |
521 | CHECK_REPEAT (w->interval); |
537 | CHECK_REPEAT (w->interval); |
522 | |
538 | |
523 | void evperiodic_stop (struct ev_periodic *w) |
539 | void evperiodic_stop (struct ev_periodic *w) |
524 | |
540 | |
|
|
541 | void DESTROY (struct ev_periodic *w) |
|
|
542 | CODE: |
|
|
543 | evperiodic_stop (w); |
|
|
544 | |
525 | void set (struct ev_periodic *w, NV at, NV interval = 0.) |
545 | void set (struct ev_periodic *w, NV at, NV interval = 0.) |
526 | INIT: |
546 | INIT: |
527 | CHECK_REPEAT (interval); |
547 | CHECK_REPEAT (interval); |
528 | CODE: |
548 | CODE: |
529 | { |
549 | { |
… | |
… | |
537 | |
557 | |
538 | void evidle_start (struct ev_idle *w) |
558 | void evidle_start (struct ev_idle *w) |
539 | |
559 | |
540 | void evidle_stop (struct ev_idle *w) |
560 | void evidle_stop (struct ev_idle *w) |
541 | |
561 | |
|
|
562 | void DESTROY (struct ev_idle *w) |
|
|
563 | CODE: |
|
|
564 | evidle_stop (w); |
|
|
565 | |
542 | MODULE = EV PACKAGE = EV::Prepare PREFIX = evcheck_ |
566 | MODULE = EV PACKAGE = EV::Prepare PREFIX = evcheck_ |
543 | |
567 | |
544 | void evprepare_start (struct ev_prepare *w) |
568 | void evprepare_start (struct ev_prepare *w) |
545 | |
569 | |
546 | void evprepare_stop (struct ev_prepare *w) |
570 | void evprepare_stop (struct ev_prepare *w) |
547 | |
571 | |
|
|
572 | void DESTROY (struct ev_prepare *w) |
|
|
573 | CODE: |
|
|
574 | evprepare_stop (w); |
|
|
575 | |
548 | MODULE = EV PACKAGE = EV::Check PREFIX = evcheck_ |
576 | MODULE = EV PACKAGE = EV::Check PREFIX = evcheck_ |
549 | |
577 | |
550 | void evcheck_start (struct ev_check *w) |
578 | void evcheck_start (struct ev_check *w) |
551 | |
579 | |
552 | void evcheck_stop (struct ev_check *w) |
580 | void evcheck_stop (struct ev_check *w) |
553 | |
581 | |
|
|
582 | void DESTROY (struct ev_check *w) |
|
|
583 | CODE: |
|
|
584 | evcheck_stop (w); |
|
|
585 | |
554 | MODULE = EV PACKAGE = EV::Child PREFIX = evchild_ |
586 | MODULE = EV PACKAGE = EV::Child PREFIX = evchild_ |
555 | |
587 | |
556 | void evchild_start (struct ev_child *w) |
588 | void evchild_start (struct ev_child *w) |
557 | |
589 | |
558 | void evchild_stop (struct ev_child *w) |
590 | void evchild_stop (struct ev_child *w) |
|
|
591 | |
|
|
592 | void DESTROY (struct ev_child *w) |
|
|
593 | CODE: |
|
|
594 | evchild_stop (w); |
559 | |
595 | |
560 | void set (struct ev_child *w, int pid) |
596 | void set (struct ev_child *w, int pid) |
561 | CODE: |
597 | CODE: |
562 | { |
598 | { |
563 | int active = w->active; |
599 | int active = w->active; |