Lines Matching refs:aiop

1409 	struct aio_info *aiop;  in do_read()  local
1546 aiop = aio_slot(aio_id); in do_read()
1548 if (reada(fd, addr, nbytes, &aiop->iosw, signo) == -1) { in do_read()
1552 &aiop->iosw)); in do_read()
1567 if (aiop->iosw.sw_count != nbytes) { in do_read()
1571 aiop->iosw.sw_flag, in do_read()
1572 aiop->iosw.sw_error, in do_read()
1573 aiop->iosw.sw_count, in do_read()
1575 NULL, &aiop->iosw)); in do_read()
1608 struct aio_info *aiop; in do_write() local
1854 aiop = aio_slot(aio_id); in do_write()
1860 if (writea(fd, addr, nbytes, &aiop->iosw, signo) == -1) { in do_write()
1881 if (aiop->iosw.sw_count != nbytes) { in do_write()
1885 aiop->iosw.sw_flag, in do_write()
1886 aiop->iosw.sw_error, in do_write()
1887 aiop->iosw.sw_count, in do_write()
1889 Pattern, &aiop->iosw)); in do_write()
1916 &aiop->iosw) in do_write()
2093 struct aio_info *aiop; in do_listio() local
2189 aiop = aio_slot(aio_id); in do_listio()
2208 lio_req.li_status = &aiop->iosw; in do_listio()
2247 if (aiop->iosw.sw_count != lio->r_nbytes * nstrides) { in do_listio()
2251 aiop->iosw.sw_flag, in do_listio()
2252 aiop->iosw.sw_error, aiop->iosw.sw_count, in do_listio()
2537 struct aio_info *aiop; in sy_listio() local
2578 aiop = aio_slot(aio_id); in sy_listio()
2586 l->li_status = &aiop->iosw; in sy_listio()
2802 struct aio_info *aiop; in sy_arw() local
2814 aiop = aio_slot(aio_id); in sy_arw()
2816 memset((void *)&aiop->aiocb, 0, sizeof(aiocb_t)); in sy_arw()
2818 aiop->aiocb.aio_fildes = fd; in sy_arw()
2819 aiop->aiocb.aio_nbytes = req->r_data.io.r_nbytes; in sy_arw()
2820 aiop->aiocb.aio_offset = req->r_data.io.r_offset; in sy_arw()
2821 aiop->aiocb.aio_buf = addr; in sy_arw()
2822 aiop->aiocb.aio_reqprio = 0; /* must be 0 */ in sy_arw()
2823 aiop->aiocb.aio_lio_opcode = 0; in sy_arw()
2826 aiop->aiocb.aio_sigevent.sigev_notify = SIGEV_SIGNAL; in sy_arw()
2827 aiop->aiocb.aio_sigevent.sigev_signo = signo; in sy_arw()
2829 aiop->aiocb.aio_sigevent.sigev_signo = 0; in sy_arw()
2830 aiop->aiocb.aio_sigevent.sigev_notify = SIGEV_CALLBACK; in sy_arw()
2831 aiop->aiocb.aio_sigevent.sigev_func = cb_handler; in sy_arw()
2832 aiop->aiocb.aio_sigevent.sigev_value.sival_int = aio_id; in sy_arw()
2834 aiop->aiocb.aio_sigevent.sigev_notify = SIGEV_NONE; in sy_arw()
2835 aiop->aiocb.aio_sigevent.sigev_signo = 0; in sy_arw()
2839 rc = aio_write(&aiop->aiocb); in sy_arw()
2841 rc = aio_read(&aiop->aiocb); in sy_arw()
3068 struct aio_info *aiop; in do_rw() local
3346 aiop = aio_slot(s->aioid[i]); in do_rw()
3347 iosw = &aiop->iosw; in do_rw()
3385 aiop = aio_slot(s->aioid[i]); in do_rw()
3390 if (aiop->aio_errno != 0) { in do_rw()
3394 strerror(aiop->aio_errno), in do_rw()
3395 aiop->aio_errno, in do_rw()
3402 } else if (aiop->aio_ret != nbytes) { in do_rw()
3407 aiop->aio_errno, in do_rw()
3408 aiop->aio_ret, in do_rw()
4597 struct aio_info *aiop; in aio_handler() local
4600 aiop = &Aio_Info[i]; in aio_handler()
4602 if (aiop->strategy == A_SIGNAL && aiop->sig == sig) { in aio_handler()
4603 aiop->signalled++; in aio_handler()
4605 if (aio_done(aiop)) { in aio_handler()
4606 aiop->done++; in aio_handler()
4643 struct aio_info *aiop; in cb_handler() local
4646 aiop = aio_slot(val.sival_int); in cb_handler()
4650 if (aiop->strategy == A_CALLBACK) { in cb_handler()
4651 aiop->signalled++; in cb_handler()
4653 if (aio_done(aiop)) { in cb_handler()
4654 aiop->done++; in cb_handler()
4664 struct aio_info *aiop; in aio_slot() local
4666 aiop = NULL; in aio_slot()
4671 aiop = &Aio_Info[i]; in aio_slot()
4672 aiop->busy = 1; in aio_slot()
4673 aiop->id = id++; in aio_slot()
4678 aiop = &Aio_Info[i]; in aio_slot()
4684 if (aiop == NULL) { in aio_slot()
4692 return aiop; in aio_slot()
4697 struct aio_info *aiop; in aio_register() local
4700 aiop = aio_slot(-1); in aio_register()
4702 aiop->fd = fd; in aio_register()
4703 aiop->strategy = strategy; in aio_register()
4704 aiop->done = 0; in aio_register()
4706 memset((char *)&aiop->iosw, 0x00, sizeof(aiop->iosw)); in aio_register()
4710 aiop->sig = sig; in aio_register()
4711 aiop->signalled = 0; in aio_register()
4717 sigaction(sig, &sa, &aiop->osa); in aio_register()
4719 aiop->sig = -1; in aio_register()
4720 aiop->signalled = 0; in aio_register()
4723 return aiop->id; in aio_register()
4728 struct aio_info *aiop; in aio_unregister() local
4730 aiop = aio_slot(aio_id); in aio_unregister()
4732 if (aiop->strategy == A_SIGNAL) { in aio_unregister()
4733 sigaction(aiop->sig, &aiop->osa, NULL); in aio_unregister()
4736 aiop->busy = 0; in aio_unregister()
4747 struct aio_info *aiop; in aio_wait() local
4756 aiop = aio_slot(aio_id); in aio_wait()
4759 switch (aiop->strategy) { in aio_wait()
4761 while (!aio_done(aiop)) ; in aio_wait()
4766 sighold(aiop->sig); in aio_wait()
4768 while (!aiop->signalled || !aiop->done) { in aio_wait()
4770 sighold(aiop->sig); in aio_wait()
4776 ioswlist[0] = &aiop->iosw; in aio_wait()
4777 if (recall(aiop->fd, 1, ioswlist) < 0) { in aio_wait()
4788 RECALL_SET(mask, aiop->fd); in aio_wait()
4795 RECALL_CLR(mask, aiop->fd); in aio_wait()
4800 ioswlist[0] = &aiop->iosw; in aio_wait()
4811 aioary[0] = &aiop->aiocb; in aio_wait()
4822 } while (aiop->done == 0); in aio_wait()
4841 aioary[0] = &aiop->aiocb; in aio_wait()
4849 aio_done(aiop); in aio_wait()