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.260 by root, Tue Jul 24 04:58:59 2018 UTC vs.
Revision 1.262 by root, Sun Aug 12 05:21:35 2018 UTC

12 12
13#include <stddef.h> 13#include <stddef.h>
14#include <stdlib.h> 14#include <stdlib.h>
15#include <errno.h> 15#include <errno.h>
16#include <sys/types.h> 16#include <sys/types.h>
17#include <sys/socket.h>
17#include <sys/stat.h> 18#include <sys/stat.h>
18#include <limits.h> 19#include <limits.h>
19#include <fcntl.h> 20#include <fcntl.h>
20#include <sched.h> 21#include <sched.h>
21 22
106#define expect_false(expr) expect ((expr) != 0, 0) 107#define expect_false(expr) expect ((expr) != 0, 0)
107#define expect_true(expr) expect ((expr) != 0, 1) 108#define expect_true(expr) expect ((expr) != 0, 1)
108 109
109/*****************************************************************************/ 110/*****************************************************************************/
110 111
111#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
112 127
113#include "schmorp.h" 128#include "schmorp.h"
114 129
115#if HAVE_EVENTFD 130#if HAVE_EVENTFD
116# include <sys/eventfd.h> 131# include <sys/eventfd.h>
1119 1134
1120 const_iv (MREMAP_MAYMOVE) 1135 const_iv (MREMAP_MAYMOVE)
1121 const_iv (MREMAP_FIXED) 1136 const_iv (MREMAP_FIXED)
1122 1137
1123 const_iv (F_DUPFD_CLOEXEC) 1138 const_iv (F_DUPFD_CLOEXEC)
1139
1140 const_iv (MSG_CMSG_CLOEXEC)
1141 const_iv (SOCK_CLOEXEC)
1124 1142
1125 const_iv (F_OFD_GETLK) 1143 const_iv (F_OFD_GETLK)
1126 const_iv (F_OFD_SETLK) 1144 const_iv (F_OFD_SETLK)
1127 const_iv (F_OFD_GETLKW) 1145 const_iv (F_OFD_GETLKW)
1128 1146
1609 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);
1610 1628
1611 REQ_SEND; 1629 REQ_SEND;
1612} 1630}
1613 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
1614UV 1658UV
1615major (UV dev) 1659major (UV dev)
1616 ALIAS: 1660 ALIAS:
1617 minor = 1 1661 minor = 1
1618 CODE: 1662 CODE:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines