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.168 by root, Wed Aug 4 14:02:58 2010 UTC vs.
Revision 1.169 by root, Wed Aug 4 16:06:54 2010 UTC

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#ifndef POSIX_FADV_DONTNEED 141#ifndef POSIX_FADV_DONTNEED
142# define POSIX_FADV_DONTNEED 0 142# define POSIX_FADV_DONTNEED 0
143#endif
144
145#ifndef POSIX_MADV_NORMAL
146# define POSIX_MADV_NORMAL 0
147# define NO_MADVISE 1
148#endif
149#ifndef POSIX_MADV_SEQUENTIAL
150# define POSIX_MADV_SEQUENTIAL 0
151#endif
152#ifndef POSIX_MADV_RANDOM
153# define POSIX_MADV_RANDOM 0
154#endif
155#ifndef POSIX_MADV_WILLNEED
156# define POSIX_MADV_WILLNEED 0
157#endif
158#ifndef POSIX_MADV_DONTNEED
159# define POSIX_MADV_DONTNEED 0
143#endif 160#endif
144 161
145#ifndef ST_NODEV 162#ifndef ST_NODEV
146# define ST_NODEV 0 163# define ST_NODEV 0
147#endif 164#endif
699 const_niv (FADV_RANDOM , POSIX_FADV_RANDOM) 716 const_niv (FADV_RANDOM , POSIX_FADV_RANDOM)
700 const_niv (FADV_NOREUSE , POSIX_FADV_NOREUSE) 717 const_niv (FADV_NOREUSE , POSIX_FADV_NOREUSE)
701 const_niv (FADV_WILLNEED , POSIX_FADV_WILLNEED) 718 const_niv (FADV_WILLNEED , POSIX_FADV_WILLNEED)
702 const_niv (FADV_DONTNEED , POSIX_FADV_DONTNEED) 719 const_niv (FADV_DONTNEED , POSIX_FADV_DONTNEED)
703 720
721 const_niv (MADV_NORMAL , POSIX_MADV_NORMAL)
722 const_niv (MADV_SEQUENTIAL, POSIX_MADV_SEQUENTIAL)
723 const_niv (MADV_RANDOM , POSIX_MADV_RANDOM)
724 const_niv (MADV_WILLNEED , POSIX_MADV_WILLNEED)
725 const_niv (MADV_DONTNEED , POSIX_MADV_DONTNEED)
726
704 const_iv (ST_RDONLY) 727 const_iv (ST_RDONLY)
705 const_iv (ST_NOSUID) 728 const_iv (ST_NOSUID)
706 const_iv (ST_NODEV) 729 const_iv (ST_NODEV)
707 const_iv (ST_NOEXEC) 730 const_iv (ST_NOEXEC)
708 const_iv (ST_SYNCHRONOUS) 731 const_iv (ST_SYNCHRONOUS)
1418 PROTOTYPE: $ 1441 PROTOTYPE: $
1419 CODE: 1442 CODE:
1420 sv_unmagic (scalar, MMAP_MAGIC); 1443 sv_unmagic (scalar, MMAP_MAGIC);
1421 1444
1422int 1445int
1446madvise (SV *scalar, off_t offset, off_t length, IV advice)
1447 PROTOTYPE: $$$$
1448 CODE:
1449{
1450 char *addr = SvPV_nolen (scalar) + offset;
1451
1452 if (!SvOK (ST (2)))
1453 length = SvCUR (scalar) - offset;
1454
1455 if (addr >= SvEND (scalar) || length <= 0)
1456 XSRETURN_EMPTY;
1457
1458 #if _XOPEN_SOURCE >= 600 && !NO_MADVISE
1459 RETVAL = posix_madvise (addr, length, advice);
1460 #else
1461 RETVAL = errno = ENOSYS; /* yes, this is actually correct */
1462 #endif
1463}
1464 OUTPUT:
1465 RETVAL
1466
1467int
1423mlockall (int flags) 1468mlockall (int flags)
1424 PROTOTYPE: $ 1469 PROTOTYPE: $
1425 CODE: 1470 CODE:
1426#if _POSIX_MEMLOCK 1471#if _POSIX_MEMLOCK
1427#if __GLIBC__ == 2 && __GLIBC_MINOR__ <= 7 1472#if __GLIBC__ == 2 && __GLIBC_MINOR__ <= 7

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines