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.261 by root, Tue Jul 24 19:32:20 2018 UTC vs.
Revision 1.262 by root, Sun Aug 12 05:21:35 2018 UTC

107#define expect_false(expr) expect ((expr) != 0, 0) 107#define expect_false(expr) expect ((expr) != 0, 0)
108#define expect_true(expr) expect ((expr) != 0, 1) 108#define expect_true(expr) expect ((expr) != 0, 1)
109 109
110/*****************************************************************************/ 110/*****************************************************************************/
111 111
112#include "libeio/config.h" 112#include "config.h"
113
114#if HAVE_ST_XTIMENSEC
115# define ATIMENSEC PL_statcache.st_atimensec
116# define MTIMENSEC PL_statcache.st_mtimensec
117# define CTIMENSEC PL_statcache.st_ctimensec
118#elif HAVE_ST_XTIMESPEC
119# define ATIMENSEC PL_statcache.st_atim.tv_nsec
120# define MTIMENSEC PL_statcache.st_mtim.tv_nsec
121# define CTIMENSEC PL_statcache.st_ctim.tv_nsec
122#else
123# define ATIMENSEC 0
124# define MTIMENSEC 0
125# define CTIMENSEC 0
126#endif
113 127
114#include "schmorp.h" 128#include "schmorp.h"
115 129
116#if HAVE_EVENTFD 130#if HAVE_EVENTFD
117# include <sys/eventfd.h> 131# include <sys/eventfd.h>
1613 req_set_fh_or_path (req, ix, ix == EIO_STATVFS ? EIO_FSTATVFS : EIO_FSTAT, fh_or_path); 1627 req_set_fh_or_path (req, ix, ix == EIO_STATVFS ? EIO_FSTATVFS : EIO_FSTAT, fh_or_path);
1614 1628
1615 REQ_SEND; 1629 REQ_SEND;
1616} 1630}
1617 1631
1632void
1633stat_xtime ()
1634 ALIAS:
1635 stat_atime = 1
1636 stat_mtime = 2
1637 stat_ctime = 4
1638 stat_xtime = 7
1639 PPCODE:
1640 EXTEND (SP, 3);
1641 if (ix & 1) PUSHs (newSVnv (PL_statcache.st_atime + 1e-9 * ATIMENSEC));
1642 if (ix & 2) PUSHs (newSVnv (PL_statcache.st_mtime + 1e-9 * MTIMENSEC));
1643 if (ix & 4) PUSHs (newSVnv (PL_statcache.st_ctime + 1e-9 * CTIMENSEC));
1644
1645void
1646stat_xtimensec ()
1647 ALIAS:
1648 stat_atimensec = 1
1649 stat_mtimensec = 2
1650 stat_ctimensec = 4
1651 stat_xtimensec = 7
1652 PPCODE:
1653 EXTEND (SP, 3);
1654 if (ix & 1) PUSHs (newSViv (ATIMENSEC));
1655 if (ix & 2) PUSHs (newSViv (MTIMENSEC));
1656 if (ix & 4) PUSHs (newSViv (CTIMENSEC));
1657
1618UV 1658UV
1619major (UV dev) 1659major (UV dev)
1620 ALIAS: 1660 ALIAS:
1621 minor = 1 1661 minor = 1
1622 CODE: 1662 CODE:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines