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.160 by root, Thu Jan 7 18:25:51 2010 UTC vs.
Revision 1.161 by root, Sun Jan 10 20:28:43 2010 UTC

15#include <sys/stat.h> 15#include <sys/stat.h>
16#include <sys/statvfs.h> 16#include <sys/statvfs.h>
17#include <limits.h> 17#include <limits.h>
18#include <fcntl.h> 18#include <fcntl.h>
19#include <sched.h> 19#include <sched.h>
20
21#if _POSIX_MEMLOCK
22# include <sys/mman.h>
23#endif
20 24
21/* perl namespace pollution */ 25/* perl namespace pollution */
22#undef VERSION 26#undef VERSION
23 27
24#ifdef _WIN32 28#ifdef _WIN32
120 124
121#ifndef POSIX_FADV_NORMAL 125#ifndef POSIX_FADV_NORMAL
122# define POSIX_FADV_NORMAL 0 126# define POSIX_FADV_NORMAL 0
123# define NO_FADVISE 1 127# define NO_FADVISE 1
124#endif 128#endif
125
126#ifndef POSIX_FADV_SEQUENTIAL 129#ifndef POSIX_FADV_SEQUENTIAL
127# define POSIX_FADV_SEQUENTIAL 0 130# define POSIX_FADV_SEQUENTIAL 0
128#endif 131#endif
129
130#ifndef POSIX_FADV_RANDOM 132#ifndef POSIX_FADV_RANDOM
131# define POSIX_FADV_RANDOM 0 133# define POSIX_FADV_RANDOM 0
132#endif 134#endif
133
134#ifndef POSIX_FADV_NOREUSE 135#ifndef POSIX_FADV_NOREUSE
135# define POSIX_FADV_NOREUSE 0 136# define POSIX_FADV_NOREUSE 0
136#endif 137#endif
137
138#ifndef POSIX_FADV_WILLNEED 138#ifndef POSIX_FADV_WILLNEED
139# define POSIX_FADV_WILLNEED 0 139# define POSIX_FADV_WILLNEED 0
140#endif 140#endif
141
142#ifndef POSIX_FADV_DONTNEED 141#ifndef POSIX_FADV_DONTNEED
143# define POSIX_FADV_DONTNEED 0 142# define POSIX_FADV_DONTNEED 0
144#endif 143#endif
145 144
146#ifndef ST_NODEV 145#ifndef ST_NODEV
147# define ST_NODEV 0 146# define ST_NODEV 0
148#endif 147#endif
149
150#ifndef ST_NOEXEC 148#ifndef ST_NOEXEC
151# define ST_NOEXEC 0 149# define ST_NOEXEC 0
152#endif 150#endif
153
154#ifndef ST_SYNCHRONOUS 151#ifndef ST_SYNCHRONOUS
155# define ST_SYNCHRONOUS 0 152# define ST_SYNCHRONOUS 0
156#endif 153#endif
157
158#ifndef ST_MANDLOCK 154#ifndef ST_MANDLOCK
159# define ST_MANDLOCK 0 155# define ST_MANDLOCK 0
160#endif 156#endif
161
162#ifndef ST_WRITE 157#ifndef ST_WRITE
163# define ST_WRITE 0 158# define ST_WRITE 0
164#endif 159#endif
165
166#ifndef ST_APPEND 160#ifndef ST_APPEND
167# define ST_APPEND 0 161# define ST_APPEND 0
168#endif 162#endif
169
170#ifndef ST_IMMUTABLE 163#ifndef ST_IMMUTABLE
171# define ST_IMMUTABLE 0 164# define ST_IMMUTABLE 0
172#endif 165#endif
173
174#ifndef ST_NOATIME 166#ifndef ST_NOATIME
175# define ST_NOATIME 0 167# define ST_NOATIME 0
176#endif 168#endif
177
178#ifndef ST_NODIRATIME 169#ifndef ST_NODIRATIME
179# define ST_NODIRATIME 0 170# define ST_NODIRATIME 0
180#endif 171#endif
181
182#ifndef ST_RELATIME 172#ifndef ST_RELATIME
183# define ST_RELATIME 0 173# define ST_RELATIME 0
174#endif
175
176#ifndef MCL_CURRENT
177# define MCL_CURRENT 0
178#endif
179#ifndef MCL_FUTURE
180# define MCL_FUTURE 0
184#endif 181#endif
185 182
186static int req_invoke (eio_req *req); 183static int req_invoke (eio_req *req);
187#define EIO_FINISH(req) req_invoke (req) 184#define EIO_FINISH(req) req_invoke (req)
188static void req_destroy (eio_req *grp); 185static void req_destroy (eio_req *grp);
629 const_iv (ST_IMMUTABLE , ST_IMMUTABLE) 626 const_iv (ST_IMMUTABLE , ST_IMMUTABLE)
630 const_iv (ST_NOATIME , ST_NOATIME) 627 const_iv (ST_NOATIME , ST_NOATIME)
631 const_iv (ST_NODIRATIME , ST_NODIRATIME) 628 const_iv (ST_NODIRATIME , ST_NODIRATIME)
632 const_iv (ST_RELATIME , ST_RELATIME) 629 const_iv (ST_RELATIME , ST_RELATIME)
633 630
631 const_iv (MCL_FUTURE , MCL_FUTURE)
632 const_iv (MCL_CURRENT , MCL_CURRENT)
633
634 const_eio (MS_ASYNC) 634 const_eio (MS_ASYNC)
635 const_eio (MS_INVALIDATE) 635 const_eio (MS_INVALIDATE)
636 const_eio (MS_SYNC) 636 const_eio (MS_SYNC)
637 637
638 const_eio (MT_MODIFY) 638 const_eio (MT_MODIFY)
1273 CODE: 1273 CODE:
1274 RETVAL = eio_sendfile_sync (ofh, ifh, offset, count); 1274 RETVAL = eio_sendfile_sync (ofh, ifh, offset, count);
1275 OUTPUT: 1275 OUTPUT:
1276 RETVAL 1276 RETVAL
1277 1277
1278int
1279mlockall (int flags)
1280 PROTOTYPE: $
1281 CODE:
1282#if _POSIX_MEMLOCK
1283#if __GLIBC__ == 2 && __GLIBC_MINOR__ <= 7
1284 extern int mallopt (int, int);
1285 mallopt (-6, 238); /* http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=473812 */
1286#endif
1287 mlockall (flags);
1288#else
1289 RETVAL =-1;
1290 errno = ENOSYS;
1291#endif
1292 OUTPUT:
1293 RETVAL
1294
1295int
1296munlockall ()
1297 PROTOTYPE:
1298 CODE:
1299#if _POSIX_MEMLOCK
1300 munlockall ();
1301#else
1302 RETVAL =-1;
1303 errno = ENOSYS;
1304#endif
1305 OUTPUT:
1306 RETVAL
1307
1278void _on_next_submit (SV *cb) 1308void _on_next_submit (SV *cb)
1279 CODE: 1309 CODE:
1280 SvREFCNT_dec (on_next_submit); 1310 SvREFCNT_dec (on_next_submit);
1281 on_next_submit = SvOK (cb) ? newSVsv (cb) : 0; 1311 on_next_submit = SvOK (cb) ? newSVsv (cb) : 0;
1282 1312

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines