… | |
… | |
704 | { |
704 | { |
705 | while (eio_nreqs ()) |
705 | while (eio_nreqs ()) |
706 | { |
706 | { |
707 | int size; |
707 | int size; |
708 | |
708 | |
709 | X_LOCK (reslock); |
709 | X_LOCK (EIO_POOL->reslock); |
710 | size = EIO_POOL->res_queue.size; |
710 | size = EIO_POOL->res_queue.size; |
711 | X_UNLOCK (reslock); |
711 | X_UNLOCK (EIO_POOL->reslock); |
712 | |
712 | |
713 | if (size) |
713 | if (size) |
714 | return; |
714 | return; |
715 | |
715 | |
716 | etp_maybe_start_thread (EIO_POOL); |
716 | etp_maybe_start_thread (EIO_POOL); |
… | |
… | |
985 | const_iv (MAP_SHARED) |
985 | const_iv (MAP_SHARED) |
986 | const_iv (MAP_FIXED) |
986 | const_iv (MAP_FIXED) |
987 | const_iv (MAP_ANONYMOUS) |
987 | const_iv (MAP_ANONYMOUS) |
988 | |
988 | |
989 | /* linuxish */ |
989 | /* linuxish */ |
990 | const_iv (MAP_HUGETLB) |
|
|
991 | const_iv (MAP_LOCKED) |
990 | const_iv (MAP_LOCKED) |
992 | const_iv (MAP_NORESERVE) |
991 | const_iv (MAP_NORESERVE) |
993 | const_iv (MAP_POPULATE) |
992 | const_iv (MAP_POPULATE) |
994 | const_iv (MAP_NONBLOCK) |
993 | const_iv (MAP_NONBLOCK) |
995 | const_iv (MAP_GROWSDOWN) |
994 | const_iv (MAP_GROWSDOWN) |
… | |
… | |
1297 | REQ_SEND; |
1296 | REQ_SEND; |
1298 | } |
1297 | } |
1299 | } |
1298 | } |
1300 | |
1299 | |
1301 | void |
1300 | void |
|
|
1301 | aio_ioctl (SV *fh, unsigned long request, SV8 *arg, SV *callback = &PL_sv_undef) |
|
|
1302 | ALIAS: |
|
|
1303 | aio_ioctl = EIO_IOCTL |
|
|
1304 | aio_fcntl = EIO_FCNTL |
|
|
1305 | PPCODE: |
|
|
1306 | { |
|
|
1307 | int fd = s_fileno_croak (fh, 0); |
|
|
1308 | char *svptr; |
|
|
1309 | |
|
|
1310 | if (SvPOK (arg) || !SvNIOK (arg)) |
|
|
1311 | { |
|
|
1312 | STRLEN svlen; |
|
|
1313 | /* perl uses IOCPARM_LEN for fcntl, so we do, too */ |
|
|
1314 | #ifdef IOCPARM_LEN |
|
|
1315 | STRLEN need = IOCPARM_LEN (request); |
|
|
1316 | #else |
|
|
1317 | STRLEN need = 256; |
|
|
1318 | #endif |
|
|
1319 | |
|
|
1320 | if (svlen < need) |
|
|
1321 | svptr = SvGROW (arg, need); |
|
|
1322 | } |
|
|
1323 | else |
|
|
1324 | svptr = (char *)SvIV (arg); |
|
|
1325 | |
|
|
1326 | { |
|
|
1327 | dREQ; |
|
|
1328 | |
|
|
1329 | req->type = ix; |
|
|
1330 | req->sv1 = newSVsv (fh); |
|
|
1331 | req->int1 = fd; |
|
|
1332 | req->int2 = (long)request; |
|
|
1333 | req->sv2 = SvREFCNT_inc (arg); |
|
|
1334 | req->ptr2 = svptr; |
|
|
1335 | |
|
|
1336 | REQ_SEND; |
|
|
1337 | } |
|
|
1338 | } |
|
|
1339 | |
|
|
1340 | void |
1302 | aio_readlink (SV8 *pathname, SV *callback = &PL_sv_undef) |
1341 | aio_readlink (SV8 *pathname, SV *callback = &PL_sv_undef) |
1303 | ALIAS: |
1342 | ALIAS: |
1304 | aio_readlink = EIO_READLINK |
1343 | aio_readlink = EIO_READLINK |
1305 | aio_realpath = EIO_REALPATH |
1344 | aio_realpath = EIO_REALPATH |
1306 | PPCODE: |
1345 | PPCODE: |
… | |
… | |
1366 | UV |
1405 | UV |
1367 | major (UV dev) |
1406 | major (UV dev) |
1368 | ALIAS: |
1407 | ALIAS: |
1369 | minor = 1 |
1408 | minor = 1 |
1370 | CODE: |
1409 | CODE: |
1371 | RETVAL = ix ? major (dev) : minor (dev); |
1410 | RETVAL = ix ? minor (dev) : major (dev); |
1372 | OUTPUT: |
1411 | OUTPUT: |
1373 | RETVAL |
1412 | RETVAL |
1374 | |
1413 | |
1375 | UV |
1414 | UV |
1376 | makedev (UV maj, UV min) |
1415 | makedev (UV maj, UV min) |