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.169 by root, Wed Aug 4 16:06:54 2010 UTC vs.
Revision 1.175 by root, Wed Dec 1 04:43:12 2010 UTC

122 122
123#include "libeio/eio.h" 123#include "libeio/eio.h"
124 124
125#ifndef POSIX_FADV_NORMAL 125#ifndef POSIX_FADV_NORMAL
126# define POSIX_FADV_NORMAL 0 126# define POSIX_FADV_NORMAL 0
127# define NO_FADVISE 1
128#endif 127#endif
129#ifndef POSIX_FADV_SEQUENTIAL 128#ifndef POSIX_FADV_SEQUENTIAL
130# define POSIX_FADV_SEQUENTIAL 0 129# define POSIX_FADV_SEQUENTIAL 0
131#endif 130#endif
132#ifndef POSIX_FADV_RANDOM 131#ifndef POSIX_FADV_RANDOM
140#endif 139#endif
141#ifndef POSIX_FADV_DONTNEED 140#ifndef POSIX_FADV_DONTNEED
142# define POSIX_FADV_DONTNEED 0 141# define POSIX_FADV_DONTNEED 0
143#endif 142#endif
144 143
144#if !HAVE_POSIX_FADVISE
145# define posix_fadvise(a,b,c,d) errno = ENOSYS /* also return ENOSYS */
146#endif
147
145#ifndef POSIX_MADV_NORMAL 148#ifndef POSIX_MADV_NORMAL
146# define POSIX_MADV_NORMAL 0 149# define POSIX_MADV_NORMAL 0
147# define NO_MADVISE 1
148#endif 150#endif
149#ifndef POSIX_MADV_SEQUENTIAL 151#ifndef POSIX_MADV_SEQUENTIAL
150# define POSIX_MADV_SEQUENTIAL 0 152# define POSIX_MADV_SEQUENTIAL 0
151#endif 153#endif
152#ifndef POSIX_MADV_RANDOM 154#ifndef POSIX_MADV_RANDOM
157#endif 159#endif
158#ifndef POSIX_MADV_DONTNEED 160#ifndef POSIX_MADV_DONTNEED
159# define POSIX_MADV_DONTNEED 0 161# define POSIX_MADV_DONTNEED 0
160#endif 162#endif
161 163
164#if !HAVE_POSIX_MADVISE
165# define posix_madvise(a,b,c) errno = ENOSYS /* also return ENOSYS */
166#endif
167
168#ifndef PROT_NONE
169# define PROT_NONE 0
170#endif
171#ifndef PROT_READ
172# define PROT_READ 0
173#endif
174#ifndef PROT_WRITE
175# define PROT_READ 0
176#endif
177#ifndef PROT_EXEC
178# define PROT_EXEC 0
179#endif
180
162#ifndef ST_NODEV 181#ifndef ST_NODEV
163# define ST_NODEV 0 182# define ST_NODEV 0
164#endif 183#endif
165#ifndef ST_NOEXEC 184#ifndef ST_NOEXEC
166# define ST_NOEXEC 0 185# define ST_NOEXEC 0
186#ifndef ST_NODIRATIME 205#ifndef ST_NODIRATIME
187# define ST_NODIRATIME 0 206# define ST_NODIRATIME 0
188#endif 207#endif
189#ifndef ST_RELATIME 208#ifndef ST_RELATIME
190# define ST_RELATIME 0 209# define ST_RELATIME 0
191#endif
192
193#ifndef MCL_CURRENT
194# define MCL_CURRENT 0
195#endif
196#ifndef MCL_FUTURE
197# define MCL_FUTURE 0
198#endif 210#endif
199 211
200#ifndef MAP_ANONYMOUS 212#ifndef MAP_ANONYMOUS
201# ifdef MAP_ANON 213# ifdef MAP_ANON
202# define MAP_ANONYMOUS MAP_ANON 214# define MAP_ANONYMOUS MAP_ANON
623/*****************************************************************************/ 635/*****************************************************************************/
624 636
625#if !_POSIX_MAPPED_FILES 637#if !_POSIX_MAPPED_FILES
626# define mmap(addr,length,prot,flags,fd,offs) (errno = ENOSYS, -1) 638# define mmap(addr,length,prot,flags,fd,offs) (errno = ENOSYS, -1)
627# define munmap(addr,length) (errno = ENOSYS, -1) 639# define munmap(addr,length) (errno = ENOSYS, -1)
640# define mprotect(addr,len,prot) (errno = ENOSYS, -1)
641# define PROT_NONE 0
642# define PROT_WRITE 0
643# define MAP_PRIVATE 0
644# define MAP_SHARED 0
645# define MAP_FIXED 0
628#endif 646#endif
629 647
630#define MMAP_MAGIC PERL_MAGIC_ext 648#define MMAP_MAGIC PERL_MAGIC_ext
631 649
632static int 650static int
735 const_iv (ST_IMMUTABLE) 753 const_iv (ST_IMMUTABLE)
736 const_iv (ST_NOATIME) 754 const_iv (ST_NOATIME)
737 const_iv (ST_NODIRATIME) 755 const_iv (ST_NODIRATIME)
738 const_iv (ST_RELATIME) 756 const_iv (ST_RELATIME)
739 757
758 const_iv (PROT_NONE)
740 const_iv (PROT_EXEC) 759 const_iv (PROT_EXEC)
741 const_iv (PROT_NONE)
742 const_iv (PROT_READ) 760 const_iv (PROT_READ)
743 const_iv (PROT_WRITE) 761 const_iv (PROT_WRITE)
744 762
745 /*const_iv (MAP_FIXED)*/ 763 /*const_iv (MAP_FIXED)*/
746 const_iv (MAP_PRIVATE) 764 const_iv (MAP_PRIVATE)
752 const_iv (MAP_LOCKED) 770 const_iv (MAP_LOCKED)
753 const_iv (MAP_NORESERVE) 771 const_iv (MAP_NORESERVE)
754 const_iv (MAP_POPULATE) 772 const_iv (MAP_POPULATE)
755 const_iv (MAP_NONBLOCK) 773 const_iv (MAP_NONBLOCK)
756 774
757 const_iv (MCL_FUTURE) 775 const_eio (MCL_FUTURE)
758 const_iv (MCL_CURRENT) 776 const_eio (MCL_CURRENT)
759 777
760 const_eio (MS_ASYNC) 778 const_eio (MS_ASYNC)
761 const_eio (MS_INVALIDATE) 779 const_eio (MS_INVALIDATE)
762 const_eio (MS_SYNC) 780 const_eio (MS_SYNC)
763 781
837 CODE: 855 CODE:
838 max_outstanding = maxreqs; 856 max_outstanding = maxreqs;
839 857
840void 858void
841aio_open (SV8 *pathname, int flags, int mode, SV *callback=&PL_sv_undef) 859aio_open (SV8 *pathname, int flags, int mode, SV *callback=&PL_sv_undef)
842 PROTOTYPE: $$$;$
843 PPCODE: 860 PPCODE:
844{ 861{
845 dREQ; 862 dREQ;
846 863
847 req->type = EIO_OPEN; 864 req->type = EIO_OPEN;
853 REQ_SEND; 870 REQ_SEND;
854} 871}
855 872
856void 873void
857aio_fsync (SV *fh, SV *callback=&PL_sv_undef) 874aio_fsync (SV *fh, SV *callback=&PL_sv_undef)
858 PROTOTYPE: $;$
859 ALIAS: 875 ALIAS:
860 aio_fsync = EIO_FSYNC 876 aio_fsync = EIO_FSYNC
861 aio_fdatasync = EIO_FDATASYNC 877 aio_fdatasync = EIO_FDATASYNC
862 PPCODE: 878 PPCODE:
863{ 879{
871 REQ_SEND (req); 887 REQ_SEND (req);
872} 888}
873 889
874void 890void
875aio_sync_file_range (SV *fh, off_t offset, size_t nbytes, UV flags, SV *callback=&PL_sv_undef) 891aio_sync_file_range (SV *fh, off_t offset, size_t nbytes, UV flags, SV *callback=&PL_sv_undef)
876 PROTOTYPE: $$$$;$
877 PPCODE: 892 PPCODE:
878{ 893{
879 int fd = s_fileno_croak (fh, 0); 894 int fd = s_fileno_croak (fh, 0);
880 dREQ; 895 dREQ;
881 896
889 REQ_SEND (req); 904 REQ_SEND (req);
890} 905}
891 906
892void 907void
893aio_close (SV *fh, SV *callback=&PL_sv_undef) 908aio_close (SV *fh, SV *callback=&PL_sv_undef)
894 PROTOTYPE: $;$
895 PPCODE: 909 PPCODE:
896{ 910{
897 static int close_pipe = -1; /* dummy fd to close fds via dup2 */ 911 static int close_pipe = -1; /* dummy fd to close fds via dup2 */
898 int fd = s_fileno_croak (fh, 0); 912 int fd = s_fileno_croak (fh, 0);
899 dREQ; 913 dREQ;
921void 935void
922aio_read (SV *fh, SV *offset, SV *length, SV8 *data, IV dataoffset, SV *callback=&PL_sv_undef) 936aio_read (SV *fh, SV *offset, SV *length, SV8 *data, IV dataoffset, SV *callback=&PL_sv_undef)
923 ALIAS: 937 ALIAS:
924 aio_read = EIO_READ 938 aio_read = EIO_READ
925 aio_write = EIO_WRITE 939 aio_write = EIO_WRITE
926 PROTOTYPE: $$$$$;$
927 PPCODE: 940 PPCODE:
928{ 941{
929 STRLEN svlen; 942 STRLEN svlen;
930 int fd = s_fileno_croak (fh, ix == EIO_WRITE); 943 int fd = s_fileno_croak (fh, ix == EIO_WRITE);
931 char *svptr = SvPVbyte (data, svlen); 944 char *svptr = SvPVbyte (data, svlen);
972 } 985 }
973} 986}
974 987
975void 988void
976aio_readlink (SV8 *path, SV *callback=&PL_sv_undef) 989aio_readlink (SV8 *path, SV *callback=&PL_sv_undef)
977 PROTOTYPE: $$;$
978 PPCODE: 990 PPCODE:
979{ 991{
980 SV *data; 992 SV *data;
981 dREQ; 993 dREQ;
982 994
987 REQ_SEND; 999 REQ_SEND;
988} 1000}
989 1001
990void 1002void
991aio_sendfile (SV *out_fh, SV *in_fh, off_t in_offset, size_t length, SV *callback=&PL_sv_undef) 1003aio_sendfile (SV *out_fh, SV *in_fh, off_t in_offset, size_t length, SV *callback=&PL_sv_undef)
992 PROTOTYPE: $$$$;$
993 PPCODE: 1004 PPCODE:
994{ 1005{
995 int ifd = s_fileno_croak (in_fh , 0); 1006 int ifd = s_fileno_croak (in_fh , 0);
996 int ofd = s_fileno_croak (out_fh, 1); 1007 int ofd = s_fileno_croak (out_fh, 1);
997 dREQ; 1008 dREQ;
1007 REQ_SEND; 1018 REQ_SEND;
1008} 1019}
1009 1020
1010void 1021void
1011aio_readahead (SV *fh, off_t offset, size_t length, SV *callback=&PL_sv_undef) 1022aio_readahead (SV *fh, off_t offset, size_t length, SV *callback=&PL_sv_undef)
1012 PROTOTYPE: $$$;$
1013 PPCODE: 1023 PPCODE:
1014{ 1024{
1015 int fd = s_fileno_croak (fh, 0); 1025 int fd = s_fileno_croak (fh, 0);
1016 dREQ; 1026 dREQ;
1017 1027
1218void 1228void
1219aio_mtouch (SV8 *data, IV offset = 0, SV *length = &PL_sv_undef, int flags = 0, SV *callback=&PL_sv_undef) 1229aio_mtouch (SV8 *data, IV offset = 0, SV *length = &PL_sv_undef, int flags = 0, SV *callback=&PL_sv_undef)
1220 ALIAS: 1230 ALIAS:
1221 aio_mtouch = EIO_MTOUCH 1231 aio_mtouch = EIO_MTOUCH
1222 aio_msync = EIO_MSYNC 1232 aio_msync = EIO_MSYNC
1223 PROTOTYPE: $$$$;$
1224 PPCODE: 1233 PPCODE:
1225{ 1234{
1226 STRLEN svlen; 1235 STRLEN svlen;
1236 char *svptr = SvPVbyte (data, svlen);
1227 UV len = SvUV (length); 1237 UV len = SvUV (length);
1228 char *svptr = SvPVbyte (data, svlen);
1229 1238
1230 if (offset < 0) 1239 if (offset < 0)
1231 offset += svlen; 1240 offset += svlen;
1232 1241
1233 if (offset < 0 || offset > svlen) 1242 if (offset < 0 || offset > svlen)
1238 1247
1239 { 1248 {
1240 dREQ; 1249 dREQ;
1241 1250
1242 req->type = ix; 1251 req->type = ix;
1243 req->size = len;
1244 req->sv2 = SvREFCNT_inc (data); 1252 req->sv2 = SvREFCNT_inc (data);
1245 req->ptr2 = (char *)svptr + offset; 1253 req->ptr2 = (char *)svptr + offset;
1254 req->size = len;
1246 req->int1 = flags; 1255 req->int1 = flags;
1247 1256
1248 REQ_SEND; 1257 REQ_SEND;
1249 } 1258 }
1250} 1259}
1251 1260
1252void 1261void
1262aio_mlock (SV8 *data, IV offset = 0, SV *length = &PL_sv_undef, SV *callback=&PL_sv_undef)
1263 PPCODE:
1264{
1265 STRLEN svlen;
1266 char *svptr = SvPVbyte (data, svlen);
1267 UV len = SvUV (length);
1268
1269 if (offset < 0)
1270 offset += svlen;
1271
1272 if (offset < 0 || offset > svlen)
1273 croak ("offset outside of scalar");
1274
1275 if (!SvOK (length) || len + offset > svlen)
1276 len = svlen - offset;
1277
1278 {
1279 dREQ;
1280
1281 req->type = EIO_MLOCK;
1282 req->sv2 = SvREFCNT_inc (data);
1283 req->ptr2 = (char *)svptr + offset;
1284 req->size = len;
1285
1286 REQ_SEND;
1287 }
1288}
1289
1290void
1291aio_mlockall (IV flags, SV *callback=&PL_sv_undef)
1292 PPCODE:
1293{
1294 dREQ;
1295
1296 req->type = EIO_MLOCKALL;
1297 req->int1 = flags;
1298
1299 REQ_SEND;
1300}
1301
1302void
1253aio_busy (double delay, SV *callback=&PL_sv_undef) 1303aio_busy (double delay, SV *callback=&PL_sv_undef)
1254 PPCODE: 1304 PPCODE:
1255{ 1305{
1256 dREQ; 1306 dREQ;
1257 1307
1261 REQ_SEND; 1311 REQ_SEND;
1262} 1312}
1263 1313
1264void 1314void
1265aio_group (SV *callback=&PL_sv_undef) 1315aio_group (SV *callback=&PL_sv_undef)
1266 PROTOTYPE: ;$
1267 PPCODE: 1316 PPCODE:
1268{ 1317{
1269 dREQ; 1318 dREQ;
1270 1319
1271 req->type = EIO_GROUP; 1320 req->type = EIO_GROUP;
1288 REQ_SEND; 1337 REQ_SEND;
1289} 1338}
1290 1339
1291int 1340int
1292aioreq_pri (int pri = 0) 1341aioreq_pri (int pri = 0)
1293 PROTOTYPE: ;$
1294 CODE: 1342 CODE:
1295 RETVAL = next_pri; 1343 RETVAL = next_pri;
1296 if (items > 0) 1344 if (items > 0)
1297 { 1345 {
1298 if (pri < EIO_PRI_MIN) pri = EIO_PRI_MIN; 1346 if (pri < EIO_PRI_MIN) pri = EIO_PRI_MIN;
1310 if (nice > EIO_PRI_MAX) nice = EIO_PRI_MAX; 1358 if (nice > EIO_PRI_MAX) nice = EIO_PRI_MAX;
1311 next_pri = nice; 1359 next_pri = nice;
1312 1360
1313void 1361void
1314flush () 1362flush ()
1315 PROTOTYPE:
1316 CODE: 1363 CODE:
1317 while (eio_nreqs ()) 1364 while (eio_nreqs ())
1318 { 1365 {
1319 poll_wait (); 1366 poll_wait ();
1320 poll_cb (); 1367 poll_cb ();
1321 } 1368 }
1322 1369
1323int 1370int
1324poll() 1371poll ()
1325 PROTOTYPE:
1326 CODE: 1372 CODE:
1327 poll_wait (); 1373 poll_wait ();
1328 RETVAL = poll_cb (); 1374 RETVAL = poll_cb ();
1329 OUTPUT: 1375 OUTPUT:
1330 RETVAL 1376 RETVAL
1331 1377
1332int 1378int
1333poll_fileno() 1379poll_fileno ()
1334 PROTOTYPE:
1335 CODE: 1380 CODE:
1336 RETVAL = s_epipe_fd (&respipe); 1381 RETVAL = s_epipe_fd (&respipe);
1337 OUTPUT: 1382 OUTPUT:
1338 RETVAL 1383 RETVAL
1339 1384
1340int 1385int
1341poll_cb(...) 1386poll_cb (...)
1342 PROTOTYPE: 1387 PROTOTYPE:
1343 CODE: 1388 CODE:
1344 RETVAL = poll_cb (); 1389 RETVAL = poll_cb ();
1345 OUTPUT: 1390 OUTPUT:
1346 RETVAL 1391 RETVAL
1347 1392
1348void 1393void
1349poll_wait() 1394poll_wait ()
1350 PROTOTYPE:
1351 CODE: 1395 CODE:
1352 poll_wait (); 1396 poll_wait ();
1353 1397
1354int 1398int
1355nreqs() 1399nreqs ()
1356 PROTOTYPE:
1357 CODE: 1400 CODE:
1358 RETVAL = eio_nreqs (); 1401 RETVAL = eio_nreqs ();
1359 OUTPUT: 1402 OUTPUT:
1360 RETVAL 1403 RETVAL
1361 1404
1362int 1405int
1363nready() 1406nready ()
1364 PROTOTYPE:
1365 CODE: 1407 CODE:
1366 RETVAL = eio_nready (); 1408 RETVAL = eio_nready ();
1367 OUTPUT: 1409 OUTPUT:
1368 RETVAL 1410 RETVAL
1369 1411
1370int 1412int
1371npending() 1413npending ()
1372 PROTOTYPE:
1373 CODE: 1414 CODE:
1374 RETVAL = eio_npending (); 1415 RETVAL = eio_npending ();
1375 OUTPUT: 1416 OUTPUT:
1376 RETVAL 1417 RETVAL
1377 1418
1378int 1419int
1379nthreads() 1420nthreads ()
1380 PROTOTYPE:
1381 CODE: 1421 CODE:
1382 RETVAL = eio_nthreads (); 1422 RETVAL = eio_nthreads ();
1383 OUTPUT: 1423 OUTPUT:
1384 RETVAL 1424 RETVAL
1385 1425
1386int 1426int
1387fadvise (aio_rfd fh, off_t offset, off_t length, IV advice) 1427fadvise (aio_rfd fh, off_t offset, off_t length, IV advice)
1388 PROTOTYPE: $$$$
1389 CODE: 1428 CODE:
1390#if _XOPEN_SOURCE >= 600 && !NO_FADVISE
1391 RETVAL = posix_fadvise (fh, offset, length, advice); 1429 RETVAL = posix_fadvise (fh, offset, length, advice);
1392#else
1393 RETVAL = errno = ENOSYS; /* yes, this is actually correct */
1394#endif
1395 OUTPUT: 1430 OUTPUT:
1396 RETVAL 1431 RETVAL
1397 1432
1398ssize_t 1433ssize_t
1399sendfile (aio_wfd ofh, aio_rfd ifh, off_t offset, size_t count) 1434sendfile (aio_wfd ofh, aio_rfd ifh, off_t offset, size_t count)
1400 PROTOTYPE: $$$$
1401 CODE: 1435 CODE:
1402 RETVAL = eio_sendfile_sync (ofh, ifh, offset, count); 1436 RETVAL = eio_sendfile_sync (ofh, ifh, offset, count);
1403 OUTPUT: 1437 OUTPUT:
1404 RETVAL 1438 RETVAL
1405 1439
1406void 1440void
1407mmap (SV *scalar, size_t length, int prot, int flags, SV *fh, off_t offset = 0) 1441mmap (SV *scalar, size_t length, int prot, int flags, SV *fh, off_t offset = 0)
1408 PROTOTYPE: $$$$$;$
1409 PPCODE: 1442 PPCODE:
1410 sv_unmagic (scalar, MMAP_MAGIC); 1443 sv_unmagic (scalar, MMAP_MAGIC);
1411{ 1444{
1412 int fd = SvOK (fh) ? s_fileno_croak (fh, flags & PROT_WRITE) : -1; 1445 int fd = SvOK (fh) ? s_fileno_croak (fh, flags & PROT_WRITE) : -1;
1413 void *addr = (void *)mmap (0, length, prot, flags, fd, offset); 1446 void *addr = (void *)mmap (0, length, prot, flags, fd, offset);
1436 XSRETURN_YES; 1469 XSRETURN_YES;
1437} 1470}
1438 1471
1439void 1472void
1440munmap (SV *scalar) 1473munmap (SV *scalar)
1441 PROTOTYPE: $
1442 CODE: 1474 CODE:
1443 sv_unmagic (scalar, MMAP_MAGIC); 1475 sv_unmagic (scalar, MMAP_MAGIC);
1444 1476
1445int 1477int
1446madvise (SV *scalar, off_t offset, off_t length, IV advice) 1478madvise (SV *scalar, off_t offset = 0, SV *length = &PL_sv_undef, IV advice_or_prot)
1447 PROTOTYPE: $$$$ 1479 ALIAS:
1480 mprotect = 1
1448 CODE: 1481 CODE:
1449{ 1482{
1450 char *addr = SvPV_nolen (scalar) + offset; 1483 STRLEN svlen;
1484 void *addr = SvPVbyte (scalar, svlen);
1485 size_t len = SvUV (length);
1451 1486
1452 if (!SvOK (ST (2))) 1487 if (offset < 0)
1488 offset += svlen;
1489
1490 if (offset < 0 || offset > svlen)
1491 croak ("offset outside of scalar");
1492
1493 if (!SvOK (length) || len + offset > svlen)
1453 length = SvCUR (scalar) - offset; 1494 len = svlen - offset;
1454 1495
1455 if (addr >= SvEND (scalar) || length <= 0) 1496 addr = (void *)(((intptr_t)addr) + offset);
1456 XSRETURN_EMPTY; 1497 eio_page_align (&addr, &len);
1457 1498
1458 #if _XOPEN_SOURCE >= 600 && !NO_MADVISE 1499 switch (ix)
1500 {
1459 RETVAL = posix_madvise (addr, length, advice); 1501 case 0: RETVAL = posix_madvise (addr, len, advice_or_prot); break;
1460 #else 1502 case 1: RETVAL = mprotect (addr, len, advice_or_prot); break;
1461 RETVAL = errno = ENOSYS; /* yes, this is actually correct */ 1503 }
1462 #endif
1463} 1504}
1464 OUTPUT: 1505 OUTPUT:
1465 RETVAL 1506 RETVAL
1466 1507
1467int 1508int
1468mlockall (int flags) 1509munlock (SV *scalar, off_t offset = 0, SV *length = &PL_sv_undef)
1469 PROTOTYPE: $
1470 CODE: 1510 CODE:
1511{
1512 STRLEN svlen;
1513 void *addr = SvPVbyte (scalar, svlen);
1514 size_t len = SvUV (length);
1515
1516 if (offset < 0)
1517 offset += svlen;
1518
1519 if (offset < 0 || offset > svlen)
1520 croak ("offset outside of scalar");
1521
1522 if (!SvOK (length) || len + offset > svlen)
1523 len = svlen - offset;
1524
1525 addr = (void *)(((intptr_t)addr) + offset);
1526 eio_page_align (&addr, &len);
1471#if _POSIX_MEMLOCK 1527#if _POSIX_MEMLOCK
1472#if __GLIBC__ == 2 && __GLIBC_MINOR__ <= 7 1528 RETVAL = munlock (addr, len);
1473 extern int mallopt (int, int);
1474 mallopt (-6, 238); /* http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=473812 */
1475#endif
1476 mlockall (flags);
1477#else 1529#else
1478 RETVAL = -1; 1530 RETVAL = ((errno = ENOSYS), -1);
1479 errno = ENOSYS;
1480#endif 1531#endif
1532}
1481 OUTPUT: 1533 OUTPUT:
1482 RETVAL 1534 RETVAL
1483 1535
1484int 1536int
1485munlockall () 1537munlockall ()
1486 PROTOTYPE:
1487 CODE: 1538 CODE:
1488#if _POSIX_MEMLOCK 1539#if _POSIX_MEMLOCK
1489 munlockall (); 1540 munlockall ();
1490#else 1541#else
1491 RETVAL = -1; 1542 RETVAL = -1;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines