Lines Matching defs:tl

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