… | |
… | |
710 | poll_wait (); |
710 | poll_wait (); |
711 | } |
711 | } |
712 | } |
712 | } |
713 | |
713 | |
714 | static void ecb_cold |
714 | static void ecb_cold |
715 | atfork_child (void) |
715 | reinit (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 | |
|
|
931 | void |
|
|
932 | reinit () |
|
|
933 | PROTOTYPE: |
931 | |
934 | |
932 | void |
935 | void |
933 | max_poll_reqs (unsigned int nreqs) |
936 | max_poll_reqs (unsigned int nreqs) |
934 | PROTOTYPE: $ |
937 | PROTOTYPE: $ |
935 | CODE: |
938 | CODE: |
… | |
… | |
989 | void |
992 | void |
990 | aio_fsync (SV *fh, SV *callback=&PL_sv_undef) |
993 | aio_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 | |
1590 | ssize_t |
1594 | IV |
1591 | sendfile (aio_wfd ofh, aio_rfd ifh, off_t offset, size_t count) |
1595 | sendfile (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 |