Lines Matching refs:head
240 aio_lio_t *head; in _aio_lio_alloc() local
247 if ((head = _lio_head_freelist) == NULL) { in _aio_lio_alloc()
257 for (i = 0, head = _lio_head_freelist; i < nelem; i++, head++) in _aio_lio_alloc()
258 head->lio_next = head + 1; in _aio_lio_alloc()
259 _lio_head_freelast = head - 1; in _aio_lio_alloc()
263 head = _lio_head_freelist; in _aio_lio_alloc()
265 if ((_lio_head_freelist = head->lio_next) == NULL) in _aio_lio_alloc()
270 ASSERT(head->lio_nent == 0 && head->lio_refcnt == 0); in _aio_lio_alloc()
271 head->lio_next = NULL; in _aio_lio_alloc()
272 head->lio_port = -1; in _aio_lio_alloc()
273 (void) mutex_init(&head->lio_mutex, USYNC_THREAD, NULL); in _aio_lio_alloc()
274 (void) cond_init(&head->lio_cond_cv, USYNC_THREAD, NULL); in _aio_lio_alloc()
276 return (head); in _aio_lio_alloc()
283 _aio_lio_free(aio_lio_t *head) in _aio_lio_free() argument
285 ASSERT(head->lio_nent == 0 && head->lio_refcnt == 0); in _aio_lio_free()
286 (void) mutex_destroy(&head->lio_mutex); in _aio_lio_free()
287 (void) cond_destroy(&head->lio_cond_cv); in _aio_lio_free()
288 (void) memset(head, 0, sizeof (*head)); in _aio_lio_free()
292 _lio_head_freelist = _lio_head_freelast = head; in _aio_lio_free()
294 _lio_head_freelast->lio_next = head; in _aio_lio_free()
295 _lio_head_freelast = head; in _aio_lio_free()