Lines Matching refs:head

106 _lio_listio_cleanup(aio_lio_t *head)  in _lio_listio_cleanup()  argument
110 ASSERT(MUTEX_HELD(&head->lio_mutex)); in _lio_listio_cleanup()
111 if (head->lio_refcnt == 0) { in _lio_listio_cleanup()
112 ASSERT(head->lio_nent == 0); in _lio_listio_cleanup()
115 head->lio_waiting = 0; in _lio_listio_cleanup()
116 sig_mutex_unlock(&head->lio_mutex); in _lio_listio_cleanup()
118 _aio_lio_free(head); in _lio_listio_cleanup()
127 aio_lio_t *head = NULL; in lio_listio() local
201 head = _aio_lio_alloc(); in lio_listio()
202 if (head) { in lio_listio()
203 sig_mutex_lock(&head->lio_mutex); in lio_listio()
204 head->lio_mode = mode; in lio_listio()
205 head->lio_largefile = 0; in lio_listio()
208 head->lio_port = sigevp->sigev_signo; in lio_listio()
209 head->lio_event = AIOLIO; in lio_listio()
210 head->lio_sigevent = sigevp; in lio_listio()
211 head->lio_sigval.sival_ptr = in lio_listio()
216 head->lio_port = pn->portnfy_port; in lio_listio()
217 head->lio_event = AIOLIO; in lio_listio()
218 head->lio_sigevent = sigevp; in lio_listio()
219 head->lio_sigval.sival_ptr = in lio_listio()
222 head->lio_signo = sigevp->sigev_signo; in lio_listio()
223 head->lio_sigval.sival_ptr = in lio_listio()
227 head->lio_nent = head->lio_refcnt = nent; in lio_listio()
228 sig_mutex_unlock(&head->lio_mutex); in lio_listio()
238 if (head) in lio_listio()
239 _lio_list_decr(head); in lio_listio()
248 if (head) in lio_listio()
249 _lio_list_decr(head); in lio_listio()
264 error = _aio_rw(aiocbp, head, &__nextworker_rw, rw, in lio_listio()
269 if (head) in lio_listio()
270 _lio_list_decr(head); in lio_listio()
287 if (head != NULL && head->lio_nent > 0) { in lio_listio()
288 sig_mutex_lock(&head->lio_mutex); in lio_listio()
289 while (head->lio_refcnt > 0) { in lio_listio()
291 head->lio_waiting = 1; in lio_listio()
292 pthread_cleanup_push(_lio_listio_cleanup, head); in lio_listio()
293 err = sig_cond_wait(&head->lio_cond_cv, in lio_listio()
294 &head->lio_mutex); in lio_listio()
296 head->lio_waiting = 0; in lio_listio()
297 if (err && head->lio_nent > 0) { in lio_listio()
298 sig_mutex_unlock(&head->lio_mutex); in lio_listio()
303 sig_mutex_unlock(&head->lio_mutex); in lio_listio()
304 ASSERT(head->lio_nent == 0 && head->lio_refcnt == 0); in lio_listio()
305 _aio_lio_free(head); in lio_listio()
320 _lio_list_decr(aio_lio_t *head) in _lio_list_decr() argument
322 sig_mutex_lock(&head->lio_mutex); in _lio_list_decr()
323 head->lio_nent--; in _lio_list_decr()
324 head->lio_refcnt--; in _lio_list_decr()
325 sig_mutex_unlock(&head->lio_mutex); in _lio_list_decr()
730 aio_lio_t *head; in _lio_remove() local
733 if ((head = reqp->req_head) != NULL) { in _lio_remove()
734 sig_mutex_lock(&head->lio_mutex); in _lio_remove()
735 ASSERT(head->lio_refcnt == head->lio_nent); in _lio_remove()
736 refcnt = --head->lio_nent; in _lio_remove()
737 head->lio_refcnt--; in _lio_remove()
738 sig_mutex_unlock(&head->lio_mutex); in _lio_remove()
740 _aio_lio_free(head); in _lio_remove()
749 __aio_fsync_bar(aiocb_t *aiocbp, aio_lio_t *head, aio_worker_t *aiowp, in __aio_fsync_bar() argument
757 error = _aio_rw(aiocbp, head, &next, AIOFSYNC, AIO_NO_KAIO); in __aio_fsync_bar()
759 sig_mutex_lock(&head->lio_mutex); in __aio_fsync_bar()
760 head->lio_mode = LIO_DESTROY; /* ignore fsync */ in __aio_fsync_bar()
761 head->lio_nent -= workerscnt - i; in __aio_fsync_bar()
762 head->lio_refcnt -= workerscnt - i; in __aio_fsync_bar()
763 sig_mutex_unlock(&head->lio_mutex); in __aio_fsync_bar()
775 aio_lio_t *head; in aio_fsync() local
828 head = _aio_lio_alloc(); in aio_fsync()
829 if (head == NULL) { in aio_fsync()
833 head->lio_mode = LIO_FSYNC; in aio_fsync()
834 head->lio_nent = head->lio_refcnt = __rw_workerscnt; in aio_fsync()
835 head->lio_largefile = 0; in aio_fsync()
840 fret = __aio_fsync_bar(aiocbp, head, __workers_rw, __rw_workerscnt); in aio_fsync()
853 _aio_lio_free(head); in aio_fsync()
1323 aio_lio_t *head = NULL; in lio_listio64() local
1397 head = _aio_lio_alloc(); in lio_listio64()
1398 if (head) { in lio_listio64()
1399 sig_mutex_lock(&head->lio_mutex); in lio_listio64()
1400 head->lio_mode = mode; in lio_listio64()
1401 head->lio_largefile = 1; in lio_listio64()
1404 head->lio_port = sigevp->sigev_signo; in lio_listio64()
1405 head->lio_event = AIOLIO64; in lio_listio64()
1406 head->lio_sigevent = sigevp; in lio_listio64()
1407 head->lio_sigval.sival_ptr = in lio_listio64()
1412 head->lio_port = pn->portnfy_port; in lio_listio64()
1413 head->lio_event = AIOLIO64; in lio_listio64()
1414 head->lio_sigevent = sigevp; in lio_listio64()
1415 head->lio_sigval.sival_ptr = in lio_listio64()
1418 head->lio_signo = sigevp->sigev_signo; in lio_listio64()
1419 head->lio_sigval.sival_ptr = in lio_listio64()
1423 head->lio_nent = head->lio_refcnt = nent; in lio_listio64()
1424 sig_mutex_unlock(&head->lio_mutex); in lio_listio64()
1434 if (head) in lio_listio64()
1435 _lio_list_decr(head); in lio_listio64()
1444 if (head) in lio_listio64()
1445 _lio_list_decr(head); in lio_listio64()
1460 error = _aio_rw64(aiocbp, head, &__nextworker_rw, rw, in lio_listio64()
1465 if (head) in lio_listio64()
1466 _lio_list_decr(head); in lio_listio64()
1483 if (head != NULL && head->lio_nent > 0) { in lio_listio64()
1484 sig_mutex_lock(&head->lio_mutex); in lio_listio64()
1485 while (head->lio_refcnt > 0) { in lio_listio64()
1487 head->lio_waiting = 1; in lio_listio64()
1488 pthread_cleanup_push(_lio_listio_cleanup, head); in lio_listio64()
1489 err = sig_cond_wait(&head->lio_cond_cv, in lio_listio64()
1490 &head->lio_mutex); in lio_listio64()
1492 head->lio_waiting = 0; in lio_listio64()
1493 if (err && head->lio_nent > 0) { in lio_listio64()
1494 sig_mutex_unlock(&head->lio_mutex); in lio_listio64()
1499 sig_mutex_unlock(&head->lio_mutex); in lio_listio64()
1500 ASSERT(head->lio_nent == 0 && head->lio_refcnt == 0); in lio_listio64()
1501 _aio_lio_free(head); in lio_listio64()
1606 __aio_fsync_bar64(aiocb64_t *aiocbp, aio_lio_t *head, aio_worker_t *aiowp, in __aio_fsync_bar64() argument
1614 error = _aio_rw64(aiocbp, head, &next, AIOFSYNC, AIO_NO_KAIO); in __aio_fsync_bar64()
1616 sig_mutex_lock(&head->lio_mutex); in __aio_fsync_bar64()
1617 head->lio_mode = LIO_DESTROY; /* ignore fsync */ in __aio_fsync_bar64()
1618 head->lio_nent -= workerscnt - i; in __aio_fsync_bar64()
1619 head->lio_refcnt -= workerscnt - i; in __aio_fsync_bar64()
1620 sig_mutex_unlock(&head->lio_mutex); in __aio_fsync_bar64()
1632 aio_lio_t *head; in aio_fsync64() local
1685 head = _aio_lio_alloc(); in aio_fsync64()
1686 if (head == NULL) { in aio_fsync64()
1690 head->lio_mode = LIO_FSYNC; in aio_fsync64()
1691 head->lio_nent = head->lio_refcnt = __rw_workerscnt; in aio_fsync64()
1692 head->lio_largefile = 1; in aio_fsync64()
1697 fret = __aio_fsync_bar64(aiocbp, head, __workers_rw, __rw_workerscnt); in aio_fsync64()
1710 _aio_lio_free(head); in aio_fsync64()