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

Comparing EV/EV.xs (file contents):
Revision 1.146 by root, Sun Oct 24 20:05:43 2010 UTC vs.
Revision 1.147 by root, Thu Oct 28 04:59:35 2010 UTC

341 croak ("illegal file descriptor or filehandle (either no attached file descriptor or illegal value): %s", SvPV_nolen (fh)); 341 croak ("illegal file descriptor or filehandle (either no attached file descriptor or illegal value): %s", SvPV_nolen (fh));
342 342
343#define CHECK_SIG(sv,num) if ((num) < 0) \ 343#define CHECK_SIG(sv,num) if ((num) < 0) \
344 croak ("illegal signal number or name: %s", SvPV_nolen (sv)); 344 croak ("illegal signal number or name: %s", SvPV_nolen (sv));
345 345
346EV_INLINE default_fork (void)
347{
348 ev_loop_fork (EV_DEFAULT_UC);
349}
350
346///////////////////////////////////////////////////////////////////////////// 351/////////////////////////////////////////////////////////////////////////////
347// XS interface functions 352// XS interface functions
348 353
349MODULE = EV PACKAGE = EV PREFIX = ev_ 354MODULE = EV PACKAGE = EV PREFIX = ev_
350 355
365 const_iv (EV_, UNDEF) 370 const_iv (EV_, UNDEF)
366 const_iv (EV_, NONE) 371 const_iv (EV_, NONE)
367 const_iv (EV_, READ) 372 const_iv (EV_, READ)
368 const_iv (EV_, WRITE) 373 const_iv (EV_, WRITE)
369 const_iv (EV_, IO) 374 const_iv (EV_, IO)
370 const_iv (EV_, TIMEOUT) 375 const_iv (EV_, TIMER)
371 const_iv (EV_, PERIODIC) 376 const_iv (EV_, PERIODIC)
372 const_iv (EV_, SIGNAL) 377 const_iv (EV_, SIGNAL)
373 const_iv (EV_, CHILD) 378 const_iv (EV_, CHILD)
374 const_iv (EV_, STAT) 379 const_iv (EV_, STAT)
375 const_iv (EV_, IDLE) 380 const_iv (EV_, IDLE)
397 const_iv (EV, BACKEND_ALL) 402 const_iv (EV, BACKEND_ALL)
398 const_iv (EV, FLAG_AUTO) 403 const_iv (EV, FLAG_AUTO)
399 const_iv (EV, FLAG_FORKCHECK) 404 const_iv (EV, FLAG_FORKCHECK)
400 const_iv (EV, FLAG_SIGNALFD) 405 const_iv (EV, FLAG_SIGNALFD)
401 const_iv (EV, FLAG_NOENV) 406 const_iv (EV, FLAG_NOENV)
402 const_iv (EV, FLAG_NOSIGFD) /* compatibility, always 0 */
403 const_iv (EV, FLAG_NOINOTIFY) 407 const_iv (EV, FLAG_NOINOTIFY)
404 408
405 const_iv (EV_, VERSION_MAJOR) 409 const_iv (EV_, VERSION_MAJOR)
406 const_iv (EV_, VERSION_MINOR) 410 const_iv (EV_, VERSION_MINOR)
407#if EV_COMPAT3 411#if EV_COMPAT3
412 const_iv (EV, FLAG_NOSIGFD) /* compatibility, always 0 */
408 const_iv (EV_, TIMER) 413 const_iv (EV_, TIMEOUT)
409
410 const_iv (EV, LOOP_NONBLOCK) 414 const_iv (EV, LOOP_NONBLOCK)
411 const_iv (EV, LOOP_ONESHOT) 415 const_iv (EV, LOOP_ONESHOT)
412
413 const_iv (EV, UNLOOP_CANCEL) 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#endif 419#endif
417 }; 420 };
509 512
510 sv_setiv (sv, (IV)&evapi); 513 sv_setiv (sv, (IV)&evapi);
511 SvREADONLY_on (sv); 514 SvREADONLY_on (sv);
512 } 515 }
513#if !defined(_WIN32) && !defined(_MINIX) 516#if !defined(_WIN32) && !defined(_MINIX)
514 pthread_atfork (0, 0, ev_default_fork); 517 pthread_atfork (0, 0, default_fork);
515#endif 518#endif
516} 519}
517 520
518SV *ev_default_loop (unsigned int flags = 0) 521SV *ev_default_loop (unsigned int flags = 0)
519 CODE: 522 CODE:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines