--- IO-AIO/AIO.xs 2015/02/11 19:32:36 1.231 +++ IO-AIO/AIO.xs 2015/06/13 00:06:13 1.232 @@ -1035,6 +1035,8 @@ const_eio (FALLOC_FL_KEEP_SIZE) const_eio (FALLOC_FL_PUNCH_HOLE) + const_eio (FALLOC_FL_COLLAPSE_RANGE) + const_eio (FALLOC_FL_ZERO_RANGE) const_eio (READDIR_DENTS) const_eio (READDIR_DIRS_FIRST) @@ -1112,7 +1114,7 @@ max_outstanding = maxreqs; void -aio_wd (SV8 *pathname, SV *callback=&PL_sv_undef) +aio_wd (SV8 *pathname, SV *callback = &PL_sv_undef) PPCODE: { dREQ; @@ -1124,7 +1126,7 @@ } void -aio_open (SV8 *pathname, int flags, int mode, SV *callback=&PL_sv_undef) +aio_open (SV8 *pathname, int flags, int mode, SV *callback = &PL_sv_undef) PPCODE: { dREQ; @@ -1138,7 +1140,7 @@ } void -aio_fsync (SV *fh, SV *callback=&PL_sv_undef) +aio_fsync (SV *fh, SV *callback = &PL_sv_undef) ALIAS: aio_fsync = EIO_FSYNC aio_fdatasync = EIO_FDATASYNC @@ -1156,7 +1158,7 @@ } void -aio_sync_file_range (SV *fh, off_t offset, size_t nbytes, UV flags, SV *callback=&PL_sv_undef) +aio_sync_file_range (SV *fh, off_t offset, size_t nbytes, UV flags, SV *callback = &PL_sv_undef) PPCODE: { int fd = s_fileno_croak (fh, 0); @@ -1173,7 +1175,7 @@ } void -aio_allocate (SV *fh, int mode, off_t offset, size_t len, SV *callback=&PL_sv_undef) +aio_allocate (SV *fh, int mode, off_t offset, size_t len, SV *callback = &PL_sv_undef) PPCODE: { int fd = s_fileno_croak (fh, 0); @@ -1190,7 +1192,7 @@ } void -aio_close (SV *fh, SV *callback=&PL_sv_undef) +aio_close (SV *fh, SV *callback = &PL_sv_undef) PPCODE: { static int close_fd = -1; /* dummy fd to close fds via dup2 */ @@ -1224,7 +1226,7 @@ } void -aio_seek (SV *fh, SV *offset, int whence, SV *callback=&PL_sv_undef) +aio_seek (SV *fh, SV *offset, int whence, SV *callback = &PL_sv_undef) PPCODE: { int fd = s_fileno_croak (fh, 0); @@ -1240,7 +1242,7 @@ } void -aio_read (SV *fh, SV *offset, SV *length, SV8 *data, IV dataoffset, SV *callback=&PL_sv_undef) +aio_read (SV *fh, SV *offset, SV *length, SV8 *data, IV dataoffset, SV *callback = &PL_sv_undef) ALIAS: aio_read = EIO_READ aio_write = EIO_WRITE @@ -1295,7 +1297,7 @@ } void -aio_readlink (SV8 *pathname, SV *callback=&PL_sv_undef) +aio_readlink (SV8 *pathname, SV *callback = &PL_sv_undef) ALIAS: aio_readlink = EIO_READLINK aio_realpath = EIO_REALPATH @@ -1310,7 +1312,7 @@ } void -aio_sendfile (SV *out_fh, SV *in_fh, off_t in_offset, size_t length, SV *callback=&PL_sv_undef) +aio_sendfile (SV *out_fh, SV *in_fh, off_t in_offset, size_t length, SV *callback = &PL_sv_undef) PPCODE: { int ifd = s_fileno_croak (in_fh , 0); @@ -1329,7 +1331,7 @@ } void -aio_readahead (SV *fh, off_t offset, size_t length, SV *callback=&PL_sv_undef) +aio_readahead (SV *fh, off_t offset, size_t length, SV *callback = &PL_sv_undef) PPCODE: { int fd = s_fileno_croak (fh, 0); @@ -1345,7 +1347,7 @@ } void -aio_stat (SV8 *fh_or_path, SV *callback=&PL_sv_undef) +aio_stat (SV8 *fh_or_path, SV *callback = &PL_sv_undef) ALIAS: aio_stat = EIO_STAT aio_lstat = EIO_LSTAT @@ -1376,7 +1378,7 @@ RETVAL void -aio_utime (SV8 *fh_or_path, SV *atime, SV *mtime, SV *callback=&PL_sv_undef) +aio_utime (SV8 *fh_or_path, SV *atime, SV *mtime, SV *callback = &PL_sv_undef) PPCODE: { dREQ; @@ -1389,7 +1391,7 @@ } void -aio_truncate (SV8 *fh_or_path, SV *offset, SV *callback=&PL_sv_undef) +aio_truncate (SV8 *fh_or_path, SV *offset, SV *callback = &PL_sv_undef) PPCODE: { dREQ; @@ -1401,7 +1403,7 @@ } void -aio_chmod (SV8 *fh_or_path, int mode, SV *callback=&PL_sv_undef) +aio_chmod (SV8 *fh_or_path, int mode, SV *callback = &PL_sv_undef) PPCODE: { dREQ; @@ -1413,7 +1415,7 @@ } void -aio_chown (SV8 *fh_or_path, SV *uid, SV *gid, SV *callback=&PL_sv_undef) +aio_chown (SV8 *fh_or_path, SV *uid, SV *gid, SV *callback = &PL_sv_undef) PPCODE: { dREQ; @@ -1426,7 +1428,7 @@ } void -aio_readdirx (SV8 *pathname, IV flags, SV *callback=&PL_sv_undef) +aio_readdirx (SV8 *pathname, IV flags, SV *callback = &PL_sv_undef) PPCODE: { dREQ; @@ -1443,7 +1445,7 @@ } void -aio_mkdir (SV8 *pathname, int mode, SV *callback=&PL_sv_undef) +aio_mkdir (SV8 *pathname, int mode, SV *callback = &PL_sv_undef) PPCODE: { dREQ; @@ -1456,7 +1458,7 @@ } void -aio_unlink (SV8 *pathname, SV *callback=&PL_sv_undef) +aio_unlink (SV8 *pathname, SV *callback = &PL_sv_undef) ALIAS: aio_unlink = EIO_UNLINK aio_rmdir = EIO_RMDIR @@ -1472,7 +1474,7 @@ } void -aio_link (SV8 *oldpath, SV8 *newpath, SV *callback=&PL_sv_undef) +aio_link (SV8 *oldpath, SV8 *newpath, SV *callback = &PL_sv_undef) ALIAS: aio_link = EIO_LINK aio_symlink = EIO_SYMLINK @@ -1491,7 +1493,7 @@ } void -aio_mknod (SV8 *pathname, int mode, UV dev, SV *callback=&PL_sv_undef) +aio_mknod (SV8 *pathname, int mode, UV dev, SV *callback = &PL_sv_undef) PPCODE: { dREQ; @@ -1505,7 +1507,7 @@ } void -aio_mtouch (SV8 *data, IV offset = 0, SV *length = &PL_sv_undef, int flags = 0, SV *callback=&PL_sv_undef) +aio_mtouch (SV8 *data, IV offset = 0, SV *length = &PL_sv_undef, int flags = 0, SV *callback = &PL_sv_undef) ALIAS: aio_mtouch = EIO_MTOUCH aio_msync = EIO_MSYNC @@ -1538,7 +1540,7 @@ } void -aio_mlock (SV8 *data, IV offset = 0, SV *length = &PL_sv_undef, SV *callback=&PL_sv_undef) +aio_mlock (SV8 *data, IV offset = 0, SV *length = &PL_sv_undef, SV *callback = &PL_sv_undef) PPCODE: { STRLEN svlen; @@ -1567,7 +1569,7 @@ } void -aio_mlockall (IV flags, SV *callback=&PL_sv_undef) +aio_mlockall (IV flags, SV *callback = &PL_sv_undef) PPCODE: { dREQ; @@ -1579,7 +1581,7 @@ } void -aio_fiemap (SV *fh, off_t start, SV *length, U32 flags, SV *count, SV *callback=&PL_sv_undef) +aio_fiemap (SV *fh, off_t start, SV *length, U32 flags, SV *count, SV *callback = &PL_sv_undef) PPCODE: { int fd = s_fileno_croak (fh, 0); @@ -1602,7 +1604,7 @@ } void -aio_busy (double delay, SV *callback=&PL_sv_undef) +aio_busy (double delay, SV *callback = &PL_sv_undef) PPCODE: { dREQ; @@ -1614,7 +1616,7 @@ } void -aio_group (SV *callback=&PL_sv_undef) +aio_group (SV *callback = &PL_sv_undef) PPCODE: { dREQ; @@ -1629,7 +1631,7 @@ } void -aio_nop (SV *callback=&PL_sv_undef) +aio_nop (SV *callback = &PL_sv_undef) ALIAS: aio_nop = EIO_NOP aio_sync = EIO_SYNC @@ -1643,7 +1645,7 @@ } int -aioreq_pri (int pri = 0) +aioreq_pri (int pri = NO_INIT) CODE: RETVAL = next_pri; if (items > 0) @@ -1937,7 +1939,7 @@ eio_cancel (req); void -cb (aio_req_ornot req, SV *callback=&PL_sv_undef) +cb (aio_req_ornot req, SV *callback = NO_INIT) PPCODE: { if (GIMME_V != G_VOID) @@ -1945,7 +1947,7 @@ if (items > 1) { - SV *cb_cv =get_cb (callback); + SV *cb_cv = get_cb (callback); SvREFCNT_dec (req->callback); req->callback = SvREFCNT_inc (cb_cv); @@ -2012,7 +2014,7 @@ eio_grp_limit (grp, limit); void -feed (aio_req grp, SV *callback=&PL_sv_undef) +feed (aio_req grp, SV *callback = &PL_sv_undef) CODE: { SvREFCNT_dec (grp->sv2);