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.226 by root, Sun Jan 6 11:48:14 2013 UTC vs.
Revision 1.230 by root, Tue Jun 3 01:30:33 2014 UTC

19 19
20#if _POSIX_MEMLOCK || _POSIX_MEMLOCK_RANGE || _POSIX_MAPPED_FILES 20#if _POSIX_MEMLOCK || _POSIX_MEMLOCK_RANGE || _POSIX_MAPPED_FILES
21# include <sys/mman.h> 21# include <sys/mman.h>
22#endif 22#endif
23 23
24#if __linux__ 24/* the incompetent fool that created musl keeps __linux__, refuses
25 * to implement any linux standard apis, and also has no way to test
26 * for his broken iplementation. on't complain if this fails for you.
27 */
28#if __linux__ && (defined __GLIBC__ || defined __UCLIBC__)
25# include <linux/fs.h> 29# include <linux/fs.h>
26# ifdef FS_IOC_FIEMAP 30# ifdef FS_IOC_FIEMAP
27# include <linux/types.h> 31# include <linux/types.h>
28# include <linux/fiemap.h> 32# include <linux/fiemap.h>
29# define HAVE_FIEMAP 1 33# define HAVE_FIEMAP 1
1260 len = svlen - dataoffset; 1264 len = svlen - dataoffset;
1261 } 1265 }
1262 else 1266 else
1263 { 1267 {
1264 /* read: check type and grow scalar as necessary */ 1268 /* read: check type and grow scalar as necessary */
1265 SvUPGRADE (data, SVt_PV);
1266 if (SvLEN (data) >= SvCUR (data)) 1269 if (!SvPOK (data) || SvLEN (data) >= SvCUR (data))
1267 svptr = SvGROW (data, len + dataoffset + 1); 1270 svptr = sv_grow (data, len + dataoffset + 1);
1268 else if (SvCUR (data) < len + dataoffset) 1271 else if (SvCUR (data) < len + dataoffset)
1269 croak ("length + dataoffset outside of scalar, and cannot grow"); 1272 croak ("length + dataoffset outside of scalar, and cannot grow");
1270 } 1273 }
1271 1274
1272 { 1275 {
1616{ 1619{
1617 dREQ; 1620 dREQ;
1618 1621
1619 req->type = EIO_GROUP; 1622 req->type = EIO_GROUP;
1620 1623
1624 PUTBACK;
1621 req_submit (req); 1625 req_submit (req);
1626 SPAGAIN;
1627
1622 XPUSHs (req_sv (req, aio_grp_stash)); 1628 XPUSHs (req_sv (req, aio_grp_stash));
1623} 1629}
1624 1630
1625void 1631void
1626aio_nop (SV *callback=&PL_sv_undef) 1632aio_nop (SV *callback=&PL_sv_undef)
1868 RETVAL = tee (rfh, wfh, length, flags); 1874 RETVAL = tee (rfh, wfh, length, flags);
1869#else 1875#else
1870 RETVAL = EIO_ENOSYS (); 1876 RETVAL = EIO_ENOSYS ();
1871#endif 1877#endif
1872 OUTPUT: 1878 OUTPUT:
1879 RETVAL
1880
1881int
1882pipesize (aio_rfd rfh, int new_size = -1)
1883 PROTOTYPE: $;$
1884 CODE:
1885#if defined(F_SETPIPE_SZ) && defined(F_GETPIPE_SZ)
1886 if (new_size >= 0)
1887 RETVAL = fcntl (rfh, F_SETPIPE_SZ, new_size);
1888 else
1889 RETVAL = fcntl (rfh, F_GETPIPE_SZ);
1890#else
1891 errno = ENOSYS;
1892 RETVAL = -1;
1893#endif
1894 OUTPUT:
1873 RETVAL 1895 RETVAL
1874 1896
1875void _on_next_submit (SV *cb) 1897void _on_next_submit (SV *cb)
1876 CODE: 1898 CODE:
1877 SvREFCNT_dec (on_next_submit); 1899 SvREFCNT_dec (on_next_submit);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines