Lines Matching refs:reqp

527 	aio_req_t	*reqp;  in aiowait()  local
559 if ((reqp = aio_req_remove(NULL)) != NULL) { in aiowait()
560 *rval = (long)reqp->aio_req_resultp; in aiowait()
590 if (reqp) { in aiowait()
591 aphysio_unlock(reqp); in aiowait()
592 aio_copyout_result(reqp); in aiowait()
594 aio_req_free(aiop, reqp); in aiowait()
813 aio_req_t *reqp, *nreqp; in aio_unlock_requests() local
816 for (reqp = reqlist; reqp != NULL; reqp = nreqp) { in aio_unlock_requests()
818 reqp->aio_req_iocb.iocb; in aio_unlock_requests()
819 nreqp = reqp->aio_req_next; in aio_unlock_requests()
820 aphysio_unlock(reqp); in aio_unlock_requests()
821 aio_copyout_result(reqp); in aio_unlock_requests()
823 aio_req_free(aiop, reqp); in aio_unlock_requests()
829 for (reqp = reqlist; reqp != NULL; reqp = nreqp) { in aio_unlock_requests()
831 reqp->aio_req_iocb.iocb32; in aio_unlock_requests()
832 nreqp = reqp->aio_req_next; in aio_unlock_requests()
833 aphysio_unlock(reqp); in aio_unlock_requests()
834 aio_copyout_result(reqp); in aio_unlock_requests()
836 aio_req_free(aiop, reqp); in aio_unlock_requests()
903 aio_req_t *reqp, *found, *next; in aiosuspend() local
991 reqp = aio_req_done( in aiosuspend()
995 reqp = aio_req_done( in aiosuspend()
1006 reqp = aio_req_done( in aiosuspend()
1013 reqp = aio_req_done( in aiosuspend()
1019 if (reqp) { in aiosuspend()
1020 reqp->aio_req_next = found; in aiosuspend()
1021 found = reqp; in aiosuspend()
1073 for (reqp = found; reqp != NULL; reqp = next) { in aiosuspend()
1074 next = reqp->aio_req_next; in aiosuspend()
1075 aphysio_unlock(reqp); in aiosuspend()
1076 aio_copyout_result(reqp); in aiosuspend()
1078 aio_req_free(aiop, reqp); in aiosuspend()
1156 aio_req_t *reqp, int event) in aio_req_assoc_port_rw() argument
1170 aio_port_callback, reqp); in aio_req_assoc_port_rw()
1172 reqp->aio_req_portkev = pkevp; in aio_req_assoc_port_rw()
1173 reqp->aio_req_port = pntfy->portnfy_port; in aio_req_assoc_port_rw()
1205 aio_req_t *reqp; in alio() local
1403 error = aio_req_setup(&reqp, aiop, aiocb, in alio()
1418 reqp->aio_req_lio = head; in alio()
1428 reqp->aio_req_iocb.iocb = (caddr_t)cbp; in alio()
1462 aio_port_callback, reqp); in alio()
1464 reqp->aio_req_portkev = lpkevp; in alio()
1465 reqp->aio_req_port = pnotify.portnfy_port; in alio()
1475 aio_zerolen(reqp); in alio()
1478 error = (*aio_func)(vp, (aio_req_t *)&reqp->aio_req, in alio()
1499 lio_set_error(reqp, portused); in alio()
1679 aio_req_t *reqp; in aio_list_get() local
1689 for (reqp = *bucket; reqp != NULL; in aio_list_get()
1690 reqp = reqp->aio_hash_next) { in aio_list_get()
1691 if (reqp->aio_req_resultp == resultp) { in aio_list_get()
1692 head = reqp->aio_req_lio; in aio_list_get()
1732 aio_req_t *reqp; in alio_cleanup() local
1772 reqp = aio_req_done(resultp); in alio_cleanup()
1775 if (reqp != NULL) { in alio_cleanup()
1776 aphysio_unlock(reqp); in alio_cleanup()
1777 aio_copyout_result(reqp); in alio_cleanup()
1779 aio_req_free(aiop, reqp); in alio_cleanup()
1793 aio_req_t *reqp; in aioerror() local
1823 retval = aio_req_find(resultp, &reqp); in aioerror()
1827 aphysio_unlock(reqp); in aioerror()
1828 aio_copyout_result(reqp); in aioerror()
1830 aio_req_free(aiop, reqp); in aioerror()
1948 aio_req_t *reqp; in arw() local
1985 error = aio_req_setup(&reqp, aiop, &aiocb, resultp, vp, 1); in arw()
1992 error = aio_req_setupLF(&reqp, aiop, &aiocb64, resultp, vp, 1); in arw()
2004 reqp->aio_req_flags |= AIO_POLL; in arw()
2008 aio_zerolen(reqp); in arw()
2014 error = (*aio_func)(vp, (aio_req_t *)&reqp->aio_req, CRED()); in arw()
2023 aio_req_free(aiop, reqp); in arw()
2055 aio_req_t *reqp; in aiorw() local
2175 error = aio_req_setupLF(&reqp, aiop, &aiocb64, resultp, vp, 0); in aiorw()
2177 error = aio_req_setup(&reqp, aiop, &aiocb, resultp, vp, 0); in aiorw()
2188 reqp->aio_req_flags |= AIO_POLL; in aiorw()
2191 reqp->aio_req_iocb.iocb = aiocb_arg; in aiorw()
2194 reqp->aio_req_iocb.iocb32 = (caddr32_t)(uintptr_t)aiocb_arg; in aiorw()
2201 error = aio_req_assoc_port_rw(&pntfy, aiocb_arg, reqp, event); in aiorw()
2210 aio_zerolen(reqp); in aiorw()
2213 error = (*aio_func)(vp, (aio_req_t *)&reqp->aio_req, CRED()); in aiorw()
2225 aio_deq(&aiop->aio_portpending, reqp); in aiorw()
2226 aio_req_free(aiop, reqp); in aiorw()
2242 lio_set_error(aio_req_t *reqp, int portused) in lio_set_error() argument
2251 aio_deq(&aiop->aio_portpending, reqp); in lio_set_error()
2254 reqp->aio_req_flags |= AIO_PHYSIODONE; in lio_set_error()
2262 aio_req_free(aiop, reqp); in lio_set_error()
2310 aio_req_find(aio_result_t *resultp, aio_req_t **reqp) in aio_req_find() argument
2325 *reqp = aio_req_remove(ent); in aio_req_find()
2339 aio_req_remove(aio_req_t *reqp) in aio_req_remove() argument
2345 if (reqp != NULL) { in aio_req_remove()
2346 ASSERT(reqp->aio_req_flags & AIO_DONEQ); in aio_req_remove()
2347 if (reqp->aio_req_next == reqp) { in aio_req_remove()
2349 if (reqp == aiop->aio_doneq) { in aio_req_remove()
2352 ASSERT(reqp == aiop->aio_cleanupq); in aio_req_remove()
2356 reqp->aio_req_next->aio_req_prev = reqp->aio_req_prev; in aio_req_remove()
2357 reqp->aio_req_prev->aio_req_next = reqp->aio_req_next; in aio_req_remove()
2362 if (reqp == aiop->aio_doneq) in aio_req_remove()
2363 aiop->aio_doneq = reqp->aio_req_next; in aio_req_remove()
2365 if (reqp == aiop->aio_cleanupq) in aio_req_remove()
2366 aiop->aio_cleanupq = reqp->aio_req_next; in aio_req_remove()
2368 reqp->aio_req_flags &= ~AIO_DONEQ; in aio_req_remove()
2369 reqp->aio_req_next = NULL; in aio_req_remove()
2370 reqp->aio_req_prev = NULL; in aio_req_remove()
2371 } else if ((reqp = aiop->aio_doneq) != NULL) { in aio_req_remove()
2372 ASSERT(reqp->aio_req_flags & AIO_DONEQ); in aio_req_remove()
2373 if (reqp == reqp->aio_req_next) { in aio_req_remove()
2377 reqp->aio_req_prev->aio_req_next = reqp->aio_req_next; in aio_req_remove()
2378 reqp->aio_req_next->aio_req_prev = reqp->aio_req_prev; in aio_req_remove()
2379 aiop->aio_doneq = reqp->aio_req_next; in aio_req_remove()
2381 reqp->aio_req_flags &= ~AIO_DONEQ; in aio_req_remove()
2382 reqp->aio_req_next = NULL; in aio_req_remove()
2383 reqp->aio_req_prev = NULL; in aio_req_remove()
2387 return (reqp); in aio_req_remove()
2400 aio_req_t *reqp; in aio_req_setup() local
2434 if (error = aio_req_alloc(&reqp, resultp)) { in aio_req_setup()
2442 reqp->aio_req_flags = AIO_PENDING; in aio_req_setup()
2445 reqp->aio_req_flags |= AIO_SOLARIS; in aio_req_setup()
2450 aio_enq(&aiop->aio_portpending, reqp, 0); in aio_req_setup()
2455 reqp->aio_req_fd = arg->aio_fildes; in aio_req_setup()
2456 reqp->aio_req_sigqp = sqp; in aio_req_setup()
2457 reqp->aio_req_iocb.iocb = NULL; in aio_req_setup()
2458 reqp->aio_req_lio = NULL; in aio_req_setup()
2459 reqp->aio_req_buf.b_file = vp; in aio_req_setup()
2460 uio = reqp->aio_req.aio_uio; in aio_req_setup()
2465 *reqpp = reqp; in aio_req_setup()
2495 aio_req_t *reqp; in aio_req_alloc() local
2500 if ((reqp = aiop->aio_free) != NULL) { in aio_req_alloc()
2501 aiop->aio_free = reqp->aio_req_next; in aio_req_alloc()
2502 bzero(reqp, sizeof (*reqp)); in aio_req_alloc()
2512 reqp = kmem_zalloc(sizeof (struct aio_req_t), KM_NOSLEEP); in aio_req_alloc()
2513 if (reqp == NULL) in aio_req_alloc()
2516 reqp->aio_req.aio_uio = &reqp->aio_req_uio; in aio_req_alloc()
2517 reqp->aio_req.aio_uio->uio_iov = &reqp->aio_req_iov; in aio_req_alloc()
2518 reqp->aio_req.aio_private = reqp; in aio_req_alloc()
2519 reqp->aio_req_buf.b_offset = -1; in aio_req_alloc()
2520 reqp->aio_req_resultp = resultp; in aio_req_alloc()
2521 if (aio_hash_insert(reqp, aiop)) { in aio_req_alloc()
2522 reqp->aio_req_next = aiop->aio_free; in aio_req_alloc()
2523 aiop->aio_free = reqp; in aio_req_alloc()
2526 *nreqp = reqp; in aio_req_alloc()
2907 aio_req_t *reqp; in alioLF() local
3114 error = aio_req_setup(&reqp, aiop, &aiocb_n, in alioLF()
3117 error = aio_req_setupLF(&reqp, aiop, aiocb, in alioLF()
3133 reqp->aio_req_lio = head; in alioLF()
3143 reqp->aio_req_iocb.iocb32 = *ucbp; in alioLF()
3177 aio_port_callback, reqp); in alioLF()
3179 reqp->aio_req_portkev = lpkevp; in alioLF()
3180 reqp->aio_req_port = pnotify.portnfy_port; in alioLF()
3190 aio_zerolen(reqp); in alioLF()
3193 error = (*aio_func)(vp, (aio_req_t *)&reqp->aio_req, in alioLF()
3214 lio_set_error(reqp, portused); in alioLF()
3297 aio_req_t *reqp; in aio_req_setupLF() local
3331 if (error = aio_req_alloc(&reqp, resultp)) { in aio_req_setupLF()
3339 reqp->aio_req_flags = AIO_PENDING; in aio_req_setupLF()
3342 reqp->aio_req_flags |= AIO_SOLARIS; in aio_req_setupLF()
3347 aio_enq(&aiop->aio_portpending, reqp, 0); in aio_req_setupLF()
3352 reqp->aio_req_fd = arg->aio_fildes; in aio_req_setupLF()
3353 reqp->aio_req_sigqp = sqp; in aio_req_setupLF()
3354 reqp->aio_req_iocb.iocb = NULL; in aio_req_setupLF()
3355 reqp->aio_req_lio = NULL; in aio_req_setupLF()
3356 reqp->aio_req_buf.b_file = vp; in aio_req_setupLF()
3357 uio = reqp->aio_req.aio_uio; in aio_req_setupLF()
3362 *reqpp = reqp; in aio_req_setupLF()
3382 aio_req_t *reqp; in alio32() local
3609 error = aio_req_setup(&reqp, aiop, aiocb, in alio32()
3624 reqp->aio_req_lio = head; in alio32()
3634 reqp->aio_req_iocb.iocb32 = (caddr32_t)(uintptr_t)cbp; in alio32()
3682 aio_port_callback, reqp); in alio32()
3684 reqp->aio_req_portkev = lpkevp; in alio32()
3685 reqp->aio_req_port = pnotify.portnfy_port; in alio32()
3695 aio_zerolen(reqp); in alio32()
3698 error = (*aio_func)(vp, (aio_req_t *)&reqp->aio_req, in alio32()
3719 lio_set_error(reqp, portused); in alio32()
3809 aio_req_t *reqp = arg; in aio_port_callback() local
3820 reqp->aio_req_portkev = NULL; in aio_port_callback()
3821 aio_req_remove_portq(aiop, reqp); /* remove request from portq */ in aio_port_callback()
3823 aphysio_unlock(reqp); /* unlock used pages */ in aio_port_callback()
3825 if (reqp->aio_req_flags & AIO_COPYOUTDONE) { in aio_port_callback()
3826 aio_req_free_port(aiop, reqp); /* back to free list */ in aio_port_callback()
3831 iov = reqp->aio_req_uio.uio_iov; in aio_port_callback()
3832 bp = &reqp->aio_req_buf; in aio_port_callback()
3833 resultp = (void *)reqp->aio_req_resultp; in aio_port_callback()
3834 aio_req_free_port(aiop, reqp); /* request struct back to free list */ in aio_port_callback()