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.188 by root, Sun Jul 17 04:20:04 2011 UTC vs.
Revision 1.191 by root, Tue Jul 19 05:00:11 2011 UTC

30#undef opendir 30#undef opendir
31#undef closedir 31#undef closedir
32 32
33#ifdef _WIN32 33#ifdef _WIN32
34 34
35 #define EIO_STRUCT_DIRENT Direntry_t 35 // perl overrides all those nice libc functions
36
36 #undef malloc 37 #undef malloc
37 #undef free 38 #undef free
38
39 // perl overrides all those nice libc functions
40 #undef open 39 #undef open
41 #undef read 40 #undef read
42 #undef write 41 #undef write
43 #undef send 42 #undef send
44 #undef recv 43 #undef recv
710 709
711 poll_wait (); 710 poll_wait ();
712 } 711 }
713} 712}
714 713
715static void atfork_child (void) 714static void ecb_cold
715reinit (void)
716{ 716{
717 create_respipe (); 717 create_respipe ();
718
719 if (eio_init (want_poll, done_poll) < 0)
720 croak ("IO::AIO: unable to initialise eio library");
718} 721}
719 722
720/*****************************************************************************/ 723/*****************************************************************************/
721 724
722#if !_POSIX_MAPPED_FILES 725#if !_POSIX_MAPPED_FILES
920 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; )
921 newCONSTSUB (aio_stash, (char *)civ->name, newSViv (civ->iv)); 924 newCONSTSUB (aio_stash, (char *)civ->name, newSViv (civ->iv));
922 925
923 newCONSTSUB (aio_stash, "PAGESIZE", newSViv (PAGESIZE)); 926 newCONSTSUB (aio_stash, "PAGESIZE", newSViv (PAGESIZE));
924 927
925 create_respipe (); 928 reinit ();
926
927 if (eio_init (want_poll, done_poll) < 0)
928 croak ("IO::AIO: unable to initialise eio library");
929
930 /* atfork child called in fifo order, so before eio's handler */
931 X_THREAD_ATFORK (0, 0, atfork_child);
932} 929}
930
931void
932reinit ()
933 PROTOTYPE:
934 CODE:
935 reinit ();
933 936
934void 937void
935max_poll_reqs (unsigned int nreqs) 938max_poll_reqs (unsigned int nreqs)
936 PROTOTYPE: $ 939 PROTOTYPE: $
937 CODE: 940 CODE:
1587 CODE: 1590 CODE:
1588 RETVAL = posix_fadvise (fh, offset, length, advice); 1591 RETVAL = posix_fadvise (fh, offset, length, advice);
1589 OUTPUT: 1592 OUTPUT:
1590 RETVAL 1593 RETVAL
1591 1594
1592ssize_t 1595IV
1593sendfile (aio_wfd ofh, aio_rfd ifh, off_t offset, size_t count) 1596sendfile (aio_wfd ofh, aio_rfd ifh, off_t offset, size_t count)
1594 CODE: 1597 CODE:
1595 RETVAL = eio_sendfile_sync (ofh, ifh, offset, count); 1598 RETVAL = eio_sendfile_sync (ofh, ifh, offset, count);
1596 OUTPUT: 1599 OUTPUT:
1597 RETVAL 1600 RETVAL

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines