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

Comparing IO-AIO/AIO.xs (file contents):
Revision 1.189 by root, Mon Jul 18 01:27:03 2011 UTC vs.
Revision 1.194 by root, Fri Jul 29 08:35:36 2011 UTC

710 poll_wait (); 710 poll_wait ();
711 } 711 }
712} 712}
713 713
714static void ecb_cold 714static void ecb_cold
715atfork_child (void) 715reinit (void)
716{ 716{
717 create_respipe (); 717 create_respipe ();
718 718
719 if (eio_init (want_poll, done_poll) < 0) 719 if (eio_init (want_poll, done_poll) < 0)
720 croak ("IO::AIO: unable to initialise eio library"); 720 croak ("IO::AIO: unable to initialise eio library");
918 918
919 aio_stash = gv_stashpv ("IO::AIO" , 1); 919 aio_stash = gv_stashpv ("IO::AIO" , 1);
920 aio_req_stash = gv_stashpv ("IO::AIO::REQ", 1); 920 aio_req_stash = gv_stashpv ("IO::AIO::REQ", 1);
921 aio_grp_stash = gv_stashpv ("IO::AIO::GRP", 1); 921 aio_grp_stash = gv_stashpv ("IO::AIO::GRP", 1);
922 922
923 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; ) 923 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ > const_iv; civ--)
924 newCONSTSUB (aio_stash, (char *)civ->name, newSViv (civ->iv)); 924 newCONSTSUB (aio_stash, (char *)civ[-1].name, newSViv (civ[-1].iv));
925 925
926 newCONSTSUB (aio_stash, "PAGESIZE", newSViv (PAGESIZE)); 926 newCONSTSUB (aio_stash, "PAGESIZE", newSViv (PAGESIZE));
927 927
928 X_THREAD_ATFORK (0, 0, atfork_child); 928 reinit ();
929 atfork_child (); /* calls create_respipe and eio_init */
930} 929}
930
931void
932reinit ()
933 PROTOTYPE:
931 934
932void 935void
933max_poll_reqs (unsigned int nreqs) 936max_poll_reqs (unsigned int nreqs)
934 PROTOTYPE: $ 937 PROTOTYPE: $
935 CODE: 938 CODE:
989void 992void
990aio_fsync (SV *fh, SV *callback=&PL_sv_undef) 993aio_fsync (SV *fh, SV *callback=&PL_sv_undef)
991 ALIAS: 994 ALIAS:
992 aio_fsync = EIO_FSYNC 995 aio_fsync = EIO_FSYNC
993 aio_fdatasync = EIO_FDATASYNC 996 aio_fdatasync = EIO_FDATASYNC
997 aio_syncfs = EIO_SYNCFS
994 PPCODE: 998 PPCODE:
995{ 999{
996 int fd = s_fileno_croak (fh, 0); 1000 int fd = s_fileno_croak (fh, 0);
997 dREQ; 1001 dREQ;
998 1002
1585 CODE: 1589 CODE:
1586 RETVAL = posix_fadvise (fh, offset, length, advice); 1590 RETVAL = posix_fadvise (fh, offset, length, advice);
1587 OUTPUT: 1591 OUTPUT:
1588 RETVAL 1592 RETVAL
1589 1593
1590ssize_t 1594IV
1591sendfile (aio_wfd ofh, aio_rfd ifh, off_t offset, size_t count) 1595sendfile (aio_wfd ofh, aio_rfd ifh, off_t offset, size_t count)
1592 CODE: 1596 CODE:
1593 RETVAL = eio_sendfile_sync (ofh, ifh, offset, count); 1597 RETVAL = eio_sendfile_sync (ofh, ifh, offset, count);
1594 OUTPUT: 1598 OUTPUT:
1595 RETVAL 1599 RETVAL

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines