Lines Matching refs:tl

691 txg_list_create(txg_list_t *tl, size_t offset)  in txg_list_create()  argument
695 mutex_init(&tl->tl_lock, NULL, MUTEX_DEFAULT, NULL); in txg_list_create()
697 tl->tl_offset = offset; in txg_list_create()
700 tl->tl_head[t] = NULL; in txg_list_create()
704 txg_list_destroy(txg_list_t *tl) in txg_list_destroy() argument
709 ASSERT(txg_list_empty(tl, t)); in txg_list_destroy()
711 mutex_destroy(&tl->tl_lock); in txg_list_destroy()
715 txg_list_empty(txg_list_t *tl, uint64_t txg) in txg_list_empty() argument
717 return (tl->tl_head[txg & TXG_MASK] == NULL); in txg_list_empty()
728 txg_all_lists_empty(txg_list_t *tl) in txg_all_lists_empty() argument
731 if (!txg_list_empty(tl, i)) { in txg_all_lists_empty()
743 txg_list_add(txg_list_t *tl, void *p, uint64_t txg) in txg_list_add() argument
746 txg_node_t *tn = (txg_node_t *)((char *)p + tl->tl_offset); in txg_list_add()
749 mutex_enter(&tl->tl_lock); in txg_list_add()
753 tn->tn_next[t] = tl->tl_head[t]; in txg_list_add()
754 tl->tl_head[t] = tn; in txg_list_add()
756 mutex_exit(&tl->tl_lock); in txg_list_add()
767 txg_list_add_tail(txg_list_t *tl, void *p, uint64_t txg) in txg_list_add_tail() argument
770 txg_node_t *tn = (txg_node_t *)((char *)p + tl->tl_offset); in txg_list_add_tail()
773 mutex_enter(&tl->tl_lock); in txg_list_add_tail()
778 for (tp = &tl->tl_head[t]; *tp != NULL; tp = &(*tp)->tn_next[t]) in txg_list_add_tail()
785 mutex_exit(&tl->tl_lock); in txg_list_add_tail()
794 txg_list_remove(txg_list_t *tl, uint64_t txg) in txg_list_remove() argument
800 mutex_enter(&tl->tl_lock); in txg_list_remove()
801 if ((tn = tl->tl_head[t]) != NULL) { in txg_list_remove()
802 p = (char *)tn - tl->tl_offset; in txg_list_remove()
803 tl->tl_head[t] = tn->tn_next[t]; in txg_list_remove()
807 mutex_exit(&tl->tl_lock); in txg_list_remove()
816 txg_list_remove_this(txg_list_t *tl, void *p, uint64_t txg) in txg_list_remove_this() argument
821 mutex_enter(&tl->tl_lock); in txg_list_remove_this()
823 for (tp = &tl->tl_head[t]; (tn = *tp) != NULL; tp = &tn->tn_next[t]) { in txg_list_remove_this()
824 if ((char *)tn - tl->tl_offset == p) { in txg_list_remove_this()
828 mutex_exit(&tl->tl_lock); in txg_list_remove_this()
833 mutex_exit(&tl->tl_lock); in txg_list_remove_this()
839 txg_list_member(txg_list_t *tl, void *p, uint64_t txg) in txg_list_member() argument
842 txg_node_t *tn = (txg_node_t *)((char *)p + tl->tl_offset); in txg_list_member()
851 txg_list_head(txg_list_t *tl, uint64_t txg) in txg_list_head() argument
854 txg_node_t *tn = tl->tl_head[t]; in txg_list_head()
856 return (tn == NULL ? NULL : (char *)tn - tl->tl_offset); in txg_list_head()
860 txg_list_next(txg_list_t *tl, void *p, uint64_t txg) in txg_list_next() argument
863 txg_node_t *tn = (txg_node_t *)((char *)p + tl->tl_offset); in txg_list_next()
867 return (tn == NULL ? NULL : (char *)tn - tl->tl_offset); in txg_list_next()