Lines Matching defs:reqp
81 aio_req_t *reqp = (aio_req_t *)aio->aio_private;
82 struct buf *bp = &reqp->aio_req_buf;
136 bp->b_forw = (struct buf *)reqp;
157 reqp->aio_req_flags |= AIO_PAGELOCKDONE;
167 reqp->aio_req_cancel = cancel;
196 aio_req_t *reqp;
214 reqp = (aio_req_t *)bp->b_forw;
215 fd = reqp->aio_req_fd;
220 tnf_offset, blkno, btodt(reqp->aio_req_uio.uio_loffset),
221 tnf_size, size, reqp->aio_req_uio.uio_iov->iov_len,
240 ASSERT(reqp->aio_req_flags & AIO_PENDING);
242 reqp->aio_req_flags &= ~AIO_PENDING;
243 reqp_flags = reqp->aio_req_flags;
244 if ((pkevp = reqp->aio_req_portkev) != NULL) {
246 if (reqp->aio_req_flags & AIO_CLOSE_PORT) {
252 aio_deq(&aiop->aio_portpending, reqp);
253 aio_enq(&aiop->aio_portq, reqp, 0);
268 aio_deq(&aiop->aio_portpending, reqp);
269 aio_enq(&aiop->aio_portcleanupq, reqp, 0);
277 aio_deq(&aiop->aio_portpending, reqp);
278 aio_enq(&aiop->aio_portq, reqp, 0);
289 pollqflag = (reqp->aio_req_flags & AIO_POLL);
304 aio_enq(&aiop->aio_pollq, reqp, AIO_POLLQ);
305 else if (reqp->aio_req_sigqp || reqp->aio_req_lio)
306 aio_enq(&aiop->aio_notifyq, reqp, AIO_NOTIFYQ);
308 aio_enq(&aiop->aio_cleanupq, reqp,
346 sigev = reqp->aio_req_sigqp;
347 reqp->aio_req_sigqp = NULL;
350 aio_enq(&aiop->aio_doneq, reqp, AIO_DONEQ);
357 if ((head = reqp->aio_req_lio) != NULL) {
395 (reqp->aio_req_flags & AIO_SOLARIS) &&
399 reqp->aio_req_flags |= AIO_SIGNALLED;
453 aio_zerolen(aio_req_t *reqp)
456 struct buf *bp = &reqp->aio_req_buf;
458 reqp->aio_req_flags |= AIO_ZEROLEN;
460 bp->b_forw = (struct buf *)reqp;
473 aphysio_unlock(aio_req_t *reqp)
479 if (reqp->aio_req_flags & AIO_PHYSIODONE)
482 reqp->aio_req_flags |= AIO_PHYSIODONE;
484 if (reqp->aio_req_flags & AIO_ZEROLEN)
487 bp = &reqp->aio_req_buf;
488 iov = reqp->aio_req_uio.uio_iov;
490 if (reqp->aio_req_flags & AIO_PAGELOCKDONE) {
494 reqp->aio_req_flags &= ~AIO_PAGELOCKDONE;
504 aio_hash_delete(aio_t *aiop, struct aio_req_t *reqp)
507 aio_result_t *resultp = reqp->aio_req_resultp;
537 * Put a reqp onto the freelist.
540 aio_req_free(aio_t *aiop, aio_req_t *reqp)
546 if (reqp->aio_req_portkev) {
547 port_free_event(reqp->aio_req_portkev);
548 reqp->aio_req_portkev = NULL;
551 if ((liop = reqp->aio_req_lio) != NULL) {
554 reqp->aio_req_lio = NULL;
556 if (reqp->aio_req_sigqp != NULL) {
557 kmem_free(reqp->aio_req_sigqp, sizeof (sigqueue_t));
558 reqp->aio_req_sigqp = NULL;
560 reqp->aio_req_next = aiop->aio_free;
561 reqp->aio_req_prev = NULL;
562 aiop->aio_free = reqp;
566 aio_hash_delete(aiop, reqp);
570 * Put a reqp onto the freelist.
573 aio_req_free_port(aio_t *aiop, aio_req_t *reqp)
577 reqp->aio_req_next = aiop->aio_free;
578 reqp->aio_req_prev = NULL;
579 aiop->aio_free = reqp;
581 aio_hash_delete(aiop, reqp);
593 aio_req_t *reqp;
597 if ((reqp = head) != NULL) {
599 ASSERT(reqp->aio_req_prev->aio_req_next == reqp);
600 ASSERT(reqp->aio_req_next->aio_req_prev == reqp);
601 if (entry_present == reqp)
603 if (entry_missing == reqp)
605 } while ((reqp = reqp->aio_req_next) != head);
618 aio_enq(aio_req_t **qhead, aio_req_t *reqp, int qflg_new)
623 aio_verify_queue(*qhead, NULL, reqp);
626 reqp->aio_req_next = reqp;
627 reqp->aio_req_prev = reqp;
628 *qhead = reqp;
630 reqp->aio_req_next = head;
631 reqp->aio_req_prev = prev = head->aio_req_prev;
632 prev->aio_req_next = reqp;
633 head->aio_req_prev = reqp;
635 reqp->aio_req_flags |= qflg_new;
642 aio_deq(aio_req_t **qhead, aio_req_t *reqp)
644 aio_verify_queue(*qhead, reqp, NULL);
646 if (reqp->aio_req_next == reqp) {
649 reqp->aio_req_prev->aio_req_next = reqp->aio_req_next;
650 reqp->aio_req_next->aio_req_prev = reqp->aio_req_prev;
651 if (*qhead == reqp)
652 *qhead = reqp->aio_req_next;
654 reqp->aio_req_next = NULL;
655 reqp->aio_req_prev = NULL;
668 aio_req_t *reqp = q2;
671 ASSERT(reqp->aio_req_flags & qflg);
672 reqp->aio_req_flags &= ~qflg;
673 reqp->aio_req_flags |= AIO_CLEANUPQ;
674 } while ((reqp = reqp->aio_req_next) != q2);
805 aio_req_t *reqp;
828 if ((reqp = headp) != NULL) {
830 next = reqp->aio_req_next;
831 aphysio_unlock(reqp);
834 aio_req_free(aiop, reqp);
837 } while ((reqp = next) != headp);
861 if ((reqp = cleanupq) == NULL)
864 next = reqp->aio_req_next;
865 aphysio_unlock(reqp);
868 aio_req_free(aiop, reqp);
872 aio_enq(&aiop->aio_portq, reqp, 0);
874 port_send_event(reqp->aio_req_portkev);
875 if ((liop = reqp->aio_req_lio) != NULL) {
892 } while ((reqp = next) != cleanupq);
901 aio_req_t *reqp, *next;
913 if ((reqp = qhead) == NULL)
916 ASSERT(reqp->aio_req_flags & AIO_CLEANUPQ);
917 ASSERT(reqp->aio_req_portkev == NULL);
918 next = reqp->aio_req_next;
919 aphysio_unlock(reqp);
922 aio_req_free(aiop, reqp);
924 aio_enq(&aiop->aio_doneq, reqp, AIO_DONEQ);
926 if (reqp->aio_req_flags & AIO_SIGNALLED)
929 reqp->aio_req_flags |= AIO_SIGNALLED;
932 } while ((reqp = next) != qhead);
942 aio_req_t *reqp, *next;
947 if ((reqp = qhead) == NULL)
950 ASSERT(reqp->aio_req_flags & AIO_NOTIFYQ);
951 next = reqp->aio_req_next;
952 aphysio_unlock(reqp);
955 aio_req_free(aiop, reqp);
959 aio_enq(&aiop->aio_doneq, reqp, AIO_DONEQ);
960 sigev = reqp->aio_req_sigqp;
961 reqp->aio_req_sigqp = NULL;
962 if ((liohead = reqp->aio_req_lio) != NULL) {
973 aio_sigev_send(reqp->aio_req_buf.b_proc,
978 aio_sigev_send(reqp->aio_req_buf.b_proc,
982 } while ((reqp = next) != qhead);
993 aio_req_t *reqp, *next;
999 if ((reqp = qhead) == NULL)
1002 ASSERT(reqp->aio_req_flags & AIO_POLLQ);
1003 next = reqp->aio_req_next;
1004 aphysio_unlock(reqp);
1007 aio_req_free(aiop, reqp);
1010 aio_copyout_result(reqp);
1012 aio_enq(&aiop->aio_doneq, reqp, AIO_DONEQ);
1015 } while ((reqp = next) != qhead);
1027 aio_req_t *reqp, *next, *head;
1056 reqp = head;
1058 next = reqp->aio_req_next;
1059 aphysio_unlock(reqp);
1060 kmem_free(reqp, sizeof (struct aio_req_t));
1061 } while ((reqp = next) != head);
1066 for (reqp = aiop->aio_free; reqp != NULL; reqp = next) {
1067 next = reqp->aio_req_next;
1068 kmem_free(reqp, sizeof (struct aio_req_t));
1094 aio_copyout_result(aio_req_t *reqp)
1102 if (reqp->aio_req_flags & AIO_COPYOUTDONE)
1105 reqp->aio_req_flags |= AIO_COPYOUTDONE;
1107 iov = reqp->aio_req_uio.uio_iov;
1108 bp = &reqp->aio_req_buf;
1110 resultp = (void *)reqp->aio_req_resultp;
1173 aio_req_remove_portq(aio_t *aiop, aio_req_t *reqp)
1187 aio_deq(&aiop->aio_portq, reqp);
1195 aio_req_t *reqp;
1228 reqp = headp;
1230 if (reqp->aio_req_portkev &&
1231 reqp->aio_req_port == port) {
1232 reqp->aio_req_flags |= AIO_CLOSE_PORT;
1235 } while ((reqp = reqp->aio_req_next) != headp);
1253 if ((reqp = aiop->aio_portq) != NULL) {
1255 next = reqp->aio_req_next;
1256 if (reqp->aio_req_port == port) {
1258 aio_req_remove_portq(aiop, reqp);
1259 port_free_event(reqp->aio_req_portkev);
1261 reqp->aio_req_next = headp;
1262 headp = reqp;
1264 } while ((reqp = next) != aiop->aio_portq);
1269 for (reqp = headp; reqp != NULL; reqp = next) {
1270 next = reqp->aio_req_next;
1271 aphysio_unlock(reqp);
1273 aio_req_free_port(aiop, reqp);