Commit 8e6ffbd1 authored by gregor herrmann's avatar gregor herrmann

Imported Upstream version 4.33

parent 9a068410
...@@ -96,7 +96,7 @@ F</etc/passwd> asynchronously: ...@@ -96,7 +96,7 @@ F</etc/passwd> asynchronously:
print $contents; print $contents;
# exit event loop and program # exit event loop and program
EV::unloop; EV::break;
}; };
}; };
...@@ -104,7 +104,7 @@ F</etc/passwd> asynchronously: ...@@ -104,7 +104,7 @@ F</etc/passwd> asynchronously:
# check for sockets etc. etc. # check for sockets etc. etc.
# process events as long as there are some: # process events as long as there are some:
EV::loop; EV::run;
=head1 REQUEST ANATOMY AND LIFETIME =head1 REQUEST ANATOMY AND LIFETIME
...@@ -169,7 +169,7 @@ use common::sense; ...@@ -169,7 +169,7 @@ use common::sense;
use base 'Exporter'; use base 'Exporter';
BEGIN { BEGIN {
our $VERSION = 4.32; our $VERSION = 4.33;
our @AIO_REQ = qw(aio_sendfile aio_seek aio_read aio_write aio_open aio_close our @AIO_REQ = qw(aio_sendfile aio_seek aio_read aio_write aio_open aio_close
aio_stat aio_lstat aio_unlink aio_rmdir aio_readdir aio_readdirx aio_stat aio_lstat aio_unlink aio_rmdir aio_readdir aio_readdirx
...@@ -396,7 +396,7 @@ your system are, as usual, C<0>): ...@@ -396,7 +396,7 @@ your system are, as usual, C<0>):
C<O_ASYNC>, C<O_DIRECT>, C<O_NOATIME>, C<O_CLOEXEC>, C<O_NOCTTY>, C<O_NOFOLLOW>, C<O_ASYNC>, C<O_DIRECT>, C<O_NOATIME>, C<O_CLOEXEC>, C<O_NOCTTY>, C<O_NOFOLLOW>,
C<O_NONBLOCK>, C<O_EXEC>, C<O_SEARCH>, C<O_DIRECTORY>, C<O_DSYNC>, C<O_NONBLOCK>, C<O_EXEC>, C<O_SEARCH>, C<O_DIRECTORY>, C<O_DSYNC>,
C<O_RSYNC>, C<O_SYNC> and C<O_TTY_INIT>. C<O_RSYNC>, C<O_SYNC>, C<O_PATH>, C<O_TMPFILE>, and C<O_TTY_INIT>.
=item aio_close $fh, $callback->($status) =item aio_close $fh, $callback->($status)
...@@ -628,8 +628,9 @@ Linux - it is safe to hardcode these when C<$^O> is C<linux>: ...@@ -628,8 +628,9 @@ Linux - it is safe to hardcode these when C<$^O> is C<linux>:
0x0000f15f ecryptfs 0x0000f15f ecryptfs
0x00414a53 efs 0x00414a53 efs
0x0000137d ext 0x0000137d ext
0x0000ef53 ext2/ext3 0x0000ef53 ext2/ext3/ext4
0x0000ef51 ext2 0x0000ef51 ext2
0xf2f52010 f2fs
0x00004006 fat 0x00004006 fat
0x65735546 fuseblk 0x65735546 fuseblk
0x65735543 fusectl 0x65735543 fusectl
...@@ -638,6 +639,7 @@ Linux - it is safe to hardcode these when C<$^O> is C<linux>: ...@@ -638,6 +639,7 @@ Linux - it is safe to hardcode these when C<$^O> is C<linux>:
0x47504653 gpfs 0x47504653 gpfs
0x00004244 hfs 0x00004244 hfs
0xf995e849 hpfs 0xf995e849 hpfs
0x00c0ffee hostfs
0x958458f6 hugetlbfs 0x958458f6 hugetlbfs
0x2bad1dea inotifyfs 0x2bad1dea inotifyfs
0x00009660 isofs 0x00009660 isofs
...@@ -662,6 +664,7 @@ Linux - it is safe to hardcode these when C<$^O> is C<linux>: ...@@ -662,6 +664,7 @@ Linux - it is safe to hardcode these when C<$^O> is C<linux>:
0x00009fa0 proc 0x00009fa0 proc
0x6165676c pstorefs 0x6165676c pstorefs
0x0000002f qnx4 0x0000002f qnx4
0x68191122 qnx6
0x858458f6 ramfs 0x858458f6 ramfs
0x52654973 reiserfs 0x52654973 reiserfs
0x00007275 romfs 0x00007275 romfs
...@@ -727,9 +730,13 @@ Works like truncate(2) or ftruncate(2). ...@@ -727,9 +730,13 @@ Works like truncate(2) or ftruncate(2).
Allocates or frees disk space according to the C<$mode> argument. See the Allocates or frees disk space according to the C<$mode> argument. See the
linux C<fallocate> documentation for details. linux C<fallocate> documentation for details.
C<$mode> can currently be C<0> or C<IO::AIO::FALLOC_FL_KEEP_SIZE> C<$mode> is usually C<0> or C<IO::AIO::FALLOC_FL_KEEP_SIZE> to allocate
to allocate space, or C<IO::AIO::FALLOC_FL_PUNCH_HOLE | space, or C<IO::AIO::FALLOC_FL_PUNCH_HOLE | IO::AIO::FALLOC_FL_KEEP_SIZE>,
IO::AIO::FALLOC_FL_KEEP_SIZE>, to deallocate a file range. to deallocate a file range.
IO::AIO also supports C<FALLOC_FL_COLLAPSE_RANGE>, to remove a range
(without leaving a hole) and C<FALLOC_FL_ZERO_RANGE>, to zero a range (see
your L<fallocate(2)> manpage).
The file system block size used by C<fallocate> is presumably the The file system block size used by C<fallocate> is presumably the
C<f_bsize> returned by C<statvfs>. C<f_bsize> returned by C<statvfs>.
...@@ -2055,13 +2062,21 @@ filesize. ...@@ -2055,13 +2062,21 @@ filesize.
C<$prot> is a combination of C<IO::AIO::PROT_NONE>, C<IO::AIO::PROT_EXEC>, C<$prot> is a combination of C<IO::AIO::PROT_NONE>, C<IO::AIO::PROT_EXEC>,
C<IO::AIO::PROT_READ> and/or C<IO::AIO::PROT_WRITE>, C<IO::AIO::PROT_READ> and/or C<IO::AIO::PROT_WRITE>,
C<$flags> can be a combination of C<IO::AIO::MAP_SHARED> or C<$flags> can be a combination of
C<IO::AIO::MAP_PRIVATE>, or a number of system-specific flags (when C<IO::AIO::MAP_SHARED> or
not available, the are defined as 0): C<IO::AIO::MAP_ANONYMOUS> C<IO::AIO::MAP_PRIVATE>,
(which is set to C<MAP_ANON> if your system only provides this or a number of system-specific flags (when not available, the are C<0>):
constant), C<IO::AIO::MAP_HUGETLB>, C<IO::AIO::MAP_LOCKED>, C<IO::AIO::MAP_ANONYMOUS> (which is set to C<MAP_ANON> if your system only provides this constant),
C<IO::AIO::MAP_NORESERVE>, C<IO::AIO::MAP_POPULATE> or C<IO::AIO::MAP_HUGETLB>,
C<IO::AIO::MAP_NONBLOCK> C<IO::AIO::MAP_LOCKED>,
C<IO::AIO::MAP_NORESERVE>,
C<IO::AIO::MAP_POPULATE>,
C<IO::AIO::MAP_NONBLOCK>,
C<IO::AIO::MAP_FIXED>,
C<IO::AIO::MAP_GROWSDOWN>,
C<IO::AIO::MAP_32BIT>,
C<IO::AIO::MAP_HUGETLB> or
C<IO::AIO::MAP_STACK>.
If C<$fh> is C<undef>, then a file descriptor of C<-1> is passed. If C<$fh> is C<undef>, then a file descriptor of C<-1> is passed.
...@@ -2124,6 +2139,26 @@ on pipes, and currently works only on GNU/Linux systems, and fails with ...@@ -2124,6 +2139,26 @@ on pipes, and currently works only on GNU/Linux systems, and fails with
C<-1>/C<ENOSYS> everywhere else. If anybody knows how to influence pipe buffer C<-1>/C<ENOSYS> everywhere else. If anybody knows how to influence pipe buffer
size on other systems, drop me a note. size on other systems, drop me a note.
=item ($rfh, $wfh) = IO::AIO::pipe2 [$flags]
This is a direct interface to the Linux L<pipe2(2)> system call. If
C<$flags> is missing or C<0>, then this should be the same as a call to
perl's built-in C<pipe> function and create a new pipe, and works on
systems that lack the pipe2 syscall. On win32, this case invokes C<_pipe
(..., 4096, O_BINARY)>.
If C<$flags> is non-zero, it tries to invoke the pipe2 system call with
the given flags (Linux 2.6.27, glibc 2.9).
On success, the read and write file handles are returned.
On error, nothing will be returned. If the pipe2 syscall is missing and
C<$flags> is non-zero, fails with C<ENOSYS>.
Please refer to L<pipe2(2)> for more info on the C<$flags>, but at the
time of this writing, C<IO::AIO::O_CLOEXEC>, C<IO::AIO::O_NONBLOCK> and
C<IO::AIO::O_DIRECT> (Linux 3.4, for packet-based pipes) were supported.
=back =back
=cut =cut
......
...@@ -147,6 +147,7 @@ static void req_destroy (eio_req *grp); ...@@ -147,6 +147,7 @@ static void req_destroy (eio_req *grp);
#endif #endif
/* defines all sorts of constants to 0 unless they are already defined */ /* defines all sorts of constants to 0 unless they are already defined */
/* also provides const_iv_ and const_niv_ macros for them */
#include "def0.h" #include "def0.h"
#ifndef makedev #ifndef makedev
...@@ -341,6 +342,31 @@ SvAIO_WD (SV *sv) ...@@ -341,6 +342,31 @@ SvAIO_WD (SV *sv)
return (aio_wd)(long)SvIVX (SvRV (sv)); return (aio_wd)(long)SvIVX (SvRV (sv));
} }
static SV *
newmortalFH (int fd, int flags)
{
if (fd < 0)
return &PL_sv_undef;
GV *gv = (GV *)sv_newmortal ();
char sym[64];
int symlen;
symlen = snprintf (sym, sizeof (sym), "fd#%d", fd);
gv_init (gv, aio_stash, sym, symlen, 0);
symlen = snprintf (
sym,
sizeof (sym),
"%s&=%d",
flags == O_RDONLY ? "<" : flags == O_WRONLY ? ">" : "+<",
fd
);
return do_open (gv, sym, symlen, 0, 0, 0, 0)
? (SV *)gv : &PL_sv_undef;
}
static void static void
aio_grp_feed (aio_req grp) aio_grp_feed (aio_req grp)
{ {
...@@ -476,34 +502,7 @@ req_invoke (eio_req *req) ...@@ -476,34 +502,7 @@ req_invoke (eio_req *req)
break; break;
case EIO_OPEN: case EIO_OPEN:
{ PUSHs (newmortalFH (req->result, req->int1 & (O_RDONLY | O_WRONLY | O_RDWR)));
/* convert fd to fh */
SV *fh = &PL_sv_undef;
if (req->result >= 0)
{
GV *gv = (GV *)sv_newmortal ();
int flags = req->int1 & (O_RDONLY | O_WRONLY | O_RDWR);
char sym [64];
int symlen;
symlen = snprintf (sym, sizeof (sym), "fd#%d", (int)req->result);
gv_init (gv, aio_stash, sym, symlen, 0);
symlen = snprintf (
sym,
sizeof (sym),
"%s&=%d",
flags == O_RDONLY ? "<" : flags == O_WRONLY ? ">" : "+<",
(int)req->result
);
if (do_open (gv, sym, symlen, 0, 0, 0, 0))
fh = (SV *)gv;
}
PUSHs (fh);
}
break; break;
case EIO_STATVFS: case EIO_STATVFS:
...@@ -707,14 +706,14 @@ poll_wait (void) ...@@ -707,14 +706,14 @@ poll_wait (void)
{ {
int size; int size;
X_LOCK (reslock); X_LOCK (EIO_POOL->reslock);
size = res_queue.size; size = EIO_POOL->res_queue.size;
X_UNLOCK (reslock); X_UNLOCK (EIO_POOL->reslock);
if (size) if (size)
return; return;
etp_maybe_start_thread (); etp_maybe_start_thread (EIO_POOL);
s_epipe_wait (&respipe); s_epipe_wait (&respipe);
} }
...@@ -755,11 +754,6 @@ reinit (void) ...@@ -755,11 +754,6 @@ reinit (void)
#if !_POSIX_MEMORY_PROTECTION #if !_POSIX_MEMORY_PROTECTION
# define mprotect(addr,len,prot) EIO_ENOSYS () # define mprotect(addr,len,prot) EIO_ENOSYS ()
# define PROT_NONE 0
# define PROT_WRITE 0
# define MAP_PRIVATE 0
# define MAP_SHARED 0
# define MAP_FIXED 0
#endif #endif
#define MMAP_MAGIC PERL_MAGIC_ext #define MMAP_MAGIC PERL_MAGIC_ext
...@@ -909,12 +903,30 @@ BOOT: ...@@ -909,12 +903,30 @@ BOOT:
# define const_iv(name) { # name, (IV) name }, # define const_iv(name) { # name, (IV) name },
# define const_eio(name) { # name, (IV) EIO_ ## name }, # define const_eio(name) { # name, (IV) EIO_ ## name },
/* you have to re-run ./gendef0 after adding/Removing any constants here */ /* you have to re-run ./gendef0 after adding/removing any constants here */
/* the first block can be undef if missing */
const_iv (ENOSYS) const_iv (ENOSYS)
const_iv (EXDEV) const_iv (EXDEV)
const_iv (EBADR) const_iv (EBADR)
/* for lseek */
const_iv (SEEK_DATA)
const_iv (SEEK_HOLE)
const_niv (FADV_NORMAL , POSIX_FADV_NORMAL)
const_niv (FADV_SEQUENTIAL, POSIX_FADV_SEQUENTIAL)
const_niv (FADV_RANDOM , POSIX_FADV_RANDOM)
const_niv (FADV_NOREUSE , POSIX_FADV_NOREUSE)
const_niv (FADV_WILLNEED , POSIX_FADV_WILLNEED)
const_niv (FADV_DONTNEED , POSIX_FADV_DONTNEED)
const_niv (MADV_NORMAL , POSIX_MADV_NORMAL)
const_niv (MADV_SEQUENTIAL, POSIX_MADV_SEQUENTIAL)
const_niv (MADV_RANDOM , POSIX_MADV_RANDOM)
const_niv (MADV_WILLNEED , POSIX_MADV_WILLNEED)
const_niv (MADV_DONTNEED , POSIX_MADV_DONTNEED)
/* the second block will be 0 when missing */
const_iv (O_RDONLY) const_iv (O_RDONLY)
const_iv (O_WRONLY) const_iv (O_WRONLY)
const_iv (O_RDWR) const_iv (O_RDWR)
...@@ -937,6 +949,8 @@ BOOT: ...@@ -937,6 +949,8 @@ BOOT:
const_iv (O_DSYNC) const_iv (O_DSYNC)
const_iv (O_RSYNC) const_iv (O_RSYNC)
const_iv (O_SYNC) const_iv (O_SYNC)
const_iv (O_PATH)
const_iv (O_TMPFILE)
const_iv (O_TTY_INIT) const_iv (O_TTY_INIT)
const_iv (S_IFIFO) const_iv (S_IFIFO)
...@@ -949,19 +963,6 @@ BOOT: ...@@ -949,19 +963,6 @@ BOOT:
const_iv (S_IFSOCK) const_iv (S_IFSOCK)
const_iv (S_IFMT) const_iv (S_IFMT)
const_niv (FADV_NORMAL , POSIX_FADV_NORMAL)
const_niv (FADV_SEQUENTIAL, POSIX_FADV_SEQUENTIAL)
const_niv (FADV_RANDOM , POSIX_FADV_RANDOM)
const_niv (FADV_NOREUSE , POSIX_FADV_NOREUSE)
const_niv (FADV_WILLNEED , POSIX_FADV_WILLNEED)
const_niv (FADV_DONTNEED , POSIX_FADV_DONTNEED)
const_niv (MADV_NORMAL , POSIX_MADV_NORMAL)
const_niv (MADV_SEQUENTIAL, POSIX_MADV_SEQUENTIAL)
const_niv (MADV_RANDOM , POSIX_MADV_RANDOM)
const_niv (MADV_WILLNEED , POSIX_MADV_WILLNEED)
const_niv (MADV_DONTNEED , POSIX_MADV_DONTNEED)
const_iv (ST_RDONLY) const_iv (ST_RDONLY)
const_iv (ST_NOSUID) const_iv (ST_NOSUID)
const_iv (ST_NODEV) const_iv (ST_NODEV)
...@@ -980,9 +981,9 @@ BOOT: ...@@ -980,9 +981,9 @@ BOOT:
const_iv (PROT_READ) const_iv (PROT_READ)
const_iv (PROT_WRITE) const_iv (PROT_WRITE)
/*const_iv (MAP_FIXED)*/
const_iv (MAP_PRIVATE) const_iv (MAP_PRIVATE)
const_iv (MAP_SHARED) const_iv (MAP_SHARED)
const_iv (MAP_FIXED)
const_iv (MAP_ANONYMOUS) const_iv (MAP_ANONYMOUS)
/* linuxish */ /* linuxish */
...@@ -991,6 +992,10 @@ BOOT: ...@@ -991,6 +992,10 @@ BOOT:
const_iv (MAP_NORESERVE) const_iv (MAP_NORESERVE)
const_iv (MAP_POPULATE) const_iv (MAP_POPULATE)
const_iv (MAP_NONBLOCK) const_iv (MAP_NONBLOCK)
const_iv (MAP_GROWSDOWN)
const_iv (MAP_32BIT)
const_iv (MAP_HUGETLB)
const_iv (MAP_STACK)
const_iv (FIEMAP_FLAG_SYNC) const_iv (FIEMAP_FLAG_SYNC)
const_iv (FIEMAP_FLAG_XATTR) const_iv (FIEMAP_FLAG_XATTR)
...@@ -1012,10 +1017,7 @@ BOOT: ...@@ -1012,10 +1017,7 @@ BOOT:
const_iv (SPLICE_F_MORE) const_iv (SPLICE_F_MORE)
const_iv (SPLICE_F_GIFT) const_iv (SPLICE_F_GIFT)
const_iv (SEEK_DATA) /* these are libeio constants, and are independent of gendef0 */
const_iv (SEEK_HOLE)
/* libeio constants */
const_eio (SEEK_SET) const_eio (SEEK_SET)
const_eio (SEEK_CUR) const_eio (SEEK_CUR)
const_eio (SEEK_END) const_eio (SEEK_END)
...@@ -1035,6 +1037,8 @@ BOOT: ...@@ -1035,6 +1037,8 @@ BOOT:
const_eio (FALLOC_FL_KEEP_SIZE) const_eio (FALLOC_FL_KEEP_SIZE)
const_eio (FALLOC_FL_PUNCH_HOLE) 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_DENTS)
const_eio (READDIR_DIRS_FIRST) const_eio (READDIR_DIRS_FIRST)
...@@ -1112,7 +1116,7 @@ max_outstanding (unsigned int maxreqs) ...@@ -1112,7 +1116,7 @@ max_outstanding (unsigned int maxreqs)
max_outstanding = maxreqs; max_outstanding = maxreqs;
void void
aio_wd (SV8 *pathname, SV *callback=&PL_sv_undef) aio_wd (SV8 *pathname, SV *callback = &PL_sv_undef)
PPCODE: PPCODE:
{ {
dREQ; dREQ;
...@@ -1124,7 +1128,7 @@ aio_wd (SV8 *pathname, SV *callback=&PL_sv_undef) ...@@ -1124,7 +1128,7 @@ aio_wd (SV8 *pathname, SV *callback=&PL_sv_undef)
} }
void 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: PPCODE:
{ {
dREQ; dREQ;
...@@ -1138,7 +1142,7 @@ aio_open (SV8 *pathname, int flags, int mode, SV *callback=&PL_sv_undef) ...@@ -1138,7 +1142,7 @@ aio_open (SV8 *pathname, int flags, int mode, SV *callback=&PL_sv_undef)
} }
void void
aio_fsync (SV *fh, SV *callback=&PL_sv_undef) aio_fsync (SV *fh, SV *callback = &PL_sv_undef)
ALIAS: ALIAS:
aio_fsync = EIO_FSYNC aio_fsync = EIO_FSYNC
aio_fdatasync = EIO_FDATASYNC aio_fdatasync = EIO_FDATASYNC
...@@ -1156,7 +1160,7 @@ aio_fsync (SV *fh, SV *callback=&PL_sv_undef) ...@@ -1156,7 +1160,7 @@ aio_fsync (SV *fh, SV *callback=&PL_sv_undef)
} }
void 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: PPCODE:
{ {
int fd = s_fileno_croak (fh, 0); int fd = s_fileno_croak (fh, 0);
...@@ -1173,7 +1177,7 @@ aio_sync_file_range (SV *fh, off_t offset, size_t nbytes, UV flags, SV *callback ...@@ -1173,7 +1177,7 @@ aio_sync_file_range (SV *fh, off_t offset, size_t nbytes, UV flags, SV *callback
} }
void 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: PPCODE:
{ {
int fd = s_fileno_croak (fh, 0); int fd = s_fileno_croak (fh, 0);
...@@ -1190,7 +1194,7 @@ aio_allocate (SV *fh, int mode, off_t offset, size_t len, SV *callback=&PL_sv_un ...@@ -1190,7 +1194,7 @@ aio_allocate (SV *fh, int mode, off_t offset, size_t len, SV *callback=&PL_sv_un
} }
void void
aio_close (SV *fh, SV *callback=&PL_sv_undef) aio_close (SV *fh, SV *callback = &PL_sv_undef)
PPCODE: PPCODE:
{ {
static int close_fd = -1; /* dummy fd to close fds via dup2 */ static int close_fd = -1; /* dummy fd to close fds via dup2 */
...@@ -1224,7 +1228,7 @@ aio_close (SV *fh, SV *callback=&PL_sv_undef) ...@@ -1224,7 +1228,7 @@ aio_close (SV *fh, SV *callback=&PL_sv_undef)
} }
void 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: PPCODE:
{ {
int fd = s_fileno_croak (fh, 0); int fd = s_fileno_croak (fh, 0);
...@@ -1240,7 +1244,7 @@ aio_seek (SV *fh, SV *offset, int whence, SV *callback=&PL_sv_undef) ...@@ -1240,7 +1244,7 @@ aio_seek (SV *fh, SV *offset, int whence, SV *callback=&PL_sv_undef)
} }
void 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: ALIAS:
aio_read = EIO_READ aio_read = EIO_READ
aio_write = EIO_WRITE aio_write = EIO_WRITE
...@@ -1295,7 +1299,7 @@ aio_read (SV *fh, SV *offset, SV *length, SV8 *data, IV dataoffset, SV *callback ...@@ -1295,7 +1299,7 @@ aio_read (SV *fh, SV *offset, SV *length, SV8 *data, IV dataoffset, SV *callback
} }
void void
aio_readlink (SV8 *pathname, SV *callback=&PL_sv_undef) aio_readlink (SV8 *pathname, SV *callback = &PL_sv_undef)
ALIAS: ALIAS:
aio_readlink = EIO_READLINK aio_readlink = EIO_READLINK
aio_realpath = EIO_REALPATH aio_realpath = EIO_REALPATH
...@@ -1310,7 +1314,7 @@ aio_readlink (SV8 *pathname, SV *callback=&PL_sv_undef) ...@@ -1310,7 +1314,7 @@ aio_readlink (SV8 *pathname, SV *callback=&PL_sv_undef)
} }
void 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: PPCODE:
{ {
int ifd = s_fileno_croak (in_fh , 0); int ifd = s_fileno_croak (in_fh , 0);
...@@ -1329,7 +1333,7 @@ aio_sendfile (SV *out_fh, SV *in_fh, off_t in_offset, size_t length, SV *callbac ...@@ -1329,7 +1333,7 @@ aio_sendfile (SV *out_fh, SV *in_fh, off_t in_offset, size_t length, SV *callbac
} }
void 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: PPCODE:
{ {
int fd = s_fileno_croak (fh, 0); int fd = s_fileno_croak (fh, 0);
...@@ -1345,7 +1349,7 @@ aio_readahead (SV *fh, off_t offset, size_t length, SV *callback=&PL_sv_undef) ...@@ -1345,7 +1349,7 @@ aio_readahead (SV *fh, off_t offset, size_t length, SV *callback=&PL_sv_undef)
} }
void void
aio_stat (SV8 *fh_or_path, SV *callback=&PL_sv_undef) aio_stat (SV8 *fh_or_path, SV *callback = &PL_sv_undef)
ALIAS: ALIAS:
aio_stat = EIO_STAT aio_stat = EIO_STAT
aio_lstat = EIO_LSTAT aio_lstat = EIO_LSTAT
...@@ -1376,7 +1380,7 @@ makedev (UV maj, UV min) ...@@ -1376,7 +1380,7 @@ makedev (UV maj, UV min)
RETVAL RETVAL
void 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: PPCODE:
{ {
dREQ; dREQ;
...@@ -1389,7 +1393,7 @@ aio_utime (SV8 *fh_or_path, SV *atime, SV *mtime, SV *callback=&PL_sv_undef) ...@@ -1389,7 +1393,7 @@ aio_utime (SV8 *fh_or_path, SV *atime, SV *mtime, SV *callback=&PL_sv_undef)
} }
void 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: PPCODE:
{ {
dREQ; dREQ;
...@@ -1401,7 +1405,7 @@ aio_truncate (SV8 *fh_or_path, SV *offset, SV *callback=&PL_sv_undef) ...@@ -1401,7 +1405,7 @@ aio_truncate (SV8 *fh_or_path, SV *offset, SV *callback=&PL_sv_undef)
} }
void 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: PPCODE:
{ {
dREQ; dREQ;
...@@ -1413,7 +1417,7 @@ aio_chmod (SV8 *fh_or_path, int mode, SV *callback=&PL_sv_undef) ...@@ -1413,7 +1417,7 @@ aio_chmod (SV8 *fh_or_path, int mode, SV *callback=&PL_sv_undef)
} }
void 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: PPCODE:
{ {
dREQ; dREQ;
...@@ -1426,7 +1430,7 @@ aio_chown (SV8 *fh_or_path, SV *uid, SV *gid, SV *callback=&PL_sv_undef) ...@@ -1426,7 +1430,7 @@ aio_chown (SV8 *fh_or_path, SV *uid, SV *gid, SV *callback=&PL_sv_undef)
} }
void void
aio_readdirx (SV8 *pathname, IV flags, SV *callback=&PL_sv_undef) aio_readdirx (SV8 *pathname, IV flags, SV *callback = &PL_sv_undef)
PPCODE: PPCODE:
{ {
dREQ; dREQ;
...@@ -1443,7 +1447,7 @@ aio_readdirx (SV8 *pathname, IV flags, SV *callback=&PL_sv_undef) ...@@ -1443,7 +1447,7 @@ aio_readdirx (SV8 *pathname, IV flags, SV *callback=&PL_sv_undef)
} }
void void
aio_mkdir (SV8 *pathname, int mode, SV *callback=&PL_sv_undef) aio_mkdir (SV8 *pathname, int mode, SV *callback = &PL_sv_undef)
PPCODE: PPCODE:
{ {
dREQ; dREQ;
...@@ -1456,7 +1460,7 @@ aio_mkdir (SV8 *pathname, int mode, SV *callback=&PL_sv_undef) ...@@ -1456,7 +1460,7 @@ aio_mkdir (SV8 *pathname, int mode, SV *callback=&PL_sv_undef)
} }
void void
aio_unlink (SV8 *pathname, SV *callback=&PL_sv_undef) aio_unlink (SV8 *pathname, SV *callback = &PL_sv_undef)
ALIAS: ALIAS:
aio_unlink = EIO_UNLINK aio_unlink = EIO_UNLINK
aio_rmdir = EIO_RMDIR aio_rmdir = EIO_RMDIR
...@@ -1472,7 +1476,7 @@ aio_unlink (SV8 *pathname, SV *callback=&PL_sv_undef) ...@@ -1472,7 +1476,7 @@ aio_unlink (SV8 *pathname, SV *callback=&PL_sv_undef)
} }
void void
aio_link (SV8 *oldpath, SV8 *newpath, SV *callback=&PL_sv_undef) aio_link (SV8 *oldpath, SV8 *newpath, SV *callback = &PL_sv_undef)
ALIAS: ALIAS:
aio_link = EIO_LINK aio_link = EIO_LINK
aio_symlink = EIO_SYMLINK aio_symlink = EIO_SYMLINK
...@@ -1491,7 +1495,7 @@ aio_link (SV8 *oldpath, SV8 *newpath, SV *callback=&PL_sv_undef) ...@@ -1491,7 +1495,7 @@ aio_link (SV8 *oldpath, SV8 *newpath, SV *callback=&PL_sv_undef)
} }
void 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: PPCODE:
{ {
dREQ; dREQ;
...@@ -1505,7 +1509,7 @@ aio_mknod (SV8 *pathname, int mode, UV dev, SV *callback=&PL_sv_undef) ...@@ -1505,7 +1509,7 @@ aio_mknod (SV8 *pathname, int mode, UV dev, SV *callback=&PL_sv_undef)
} }
void 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: ALIAS:
aio_mtouch = EIO_MTOUCH aio_mtouch = EIO_MTOUCH
aio_msync = EIO_MSYNC aio_msync = EIO_MSYNC
...@@ -1538,7 +1542,7 @@ aio_mtouch (SV8 *data, IV offset = 0, SV *length = &PL_sv_undef, int flags = 0, ...@@ -1538,7 +1542,7 @@ aio_mtouch (SV8 *data, IV offset = 0, SV *length = &PL_sv_undef, int flags = 0,
} }
void 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: PPCODE:
{ {
STRLEN svlen; STRLEN svlen;
...@@ -1567,7 +1571,7 @@ aio_mlock (SV8 *data, IV offset = 0, SV *length = &PL_sv_undef, SV *callback=&PL ...@@ -1567,7 +1571,7 @@ aio_mlock (SV8 *data, IV offset = 0, SV *length = &PL_sv_undef, SV *callback=&PL
} }
void void
aio_mlockall (IV flags, SV *callback=&PL_sv_undef) aio_mlockall (IV flags, SV *callback = &PL_sv_undef)
PPCODE: PPCODE:
{ {
dREQ; dREQ;
...@@ -1579,7 +1583,7 @@ aio_mlockall (IV flags, SV *callback=&PL_sv_undef) ...@@ -1579,7 +1583,7 @@ aio_mlockall (IV flags, SV *callback=&PL_sv_undef)
} }
void 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: PPCODE:
{ {
int fd = s_fileno_croak (fh, 0); int fd = s_fileno_croak (fh, 0);
...@@ -1602,7 +1606,7 @@ aio_fiemap (SV *fh, off_t start, SV *length, U32 flags, SV *count, SV *callback= ...@@ -1602,7 +1606,7 @@ aio_fiemap (SV *fh, off_t start, SV *length, U32 flags, SV *count, SV *callback=
} }
void void
aio_busy (double delay, SV *callback=&PL_sv_undef) aio_busy (double delay, SV *callback = &PL_sv_undef)
PPCODE: PPCODE:
{ {
dREQ; dREQ;
...@@ -1614,7 +1618,7 @@ aio_busy (double delay, SV *callback=&PL_sv_undef) ...@@ -1614,7 +1618,7 @@ aio_busy (double delay, SV *callback=&PL_sv_undef)
} }
void void
aio_group (SV *callback=&PL_sv_undef) aio_group (SV *callback = &PL_sv_undef)
PPCODE: PPCODE:
{ {
dREQ; dREQ;
...@@ -1629,7 +1633,7 @@ aio_group (SV *callback=&PL_sv_undef) ...@@ -1629,7 +1633,7 @@ aio_group (SV *callback=&PL_sv_undef)
} }
void void
aio_nop (SV *callback=&PL_sv_undef) aio_nop (SV *callback = &PL_sv_undef)
ALIAS: ALIAS:
aio_nop = EIO_NOP aio_nop = EIO_NOP
aio_sync = EIO_SYNC aio_sync = EIO_SYNC
...@@ -1643,7 +1647,7 @@ aio_nop (SV *callback=&PL_sv_undef) ...@@ -1643,7 +1647,7 @@ aio_nop (SV *callback=&PL_sv_undef)
} }
int int