Lines Matching refs:item
58 struct ht_item *item, *tmp; in ht_destroy() local
63 TAILQ_FOREACH_SAFE(item, &he->hte_items, hti_link, tmp) { in ht_destroy()
64 free(item); in ht_destroy()
89 struct ht_item *item; in ht_find_locked() local
93 TAILQ_FOREACH(item, &entry->hte_items, hti_link) { in ht_find_locked()
94 if (item->hti_hash == hash) in ht_find_locked()
95 return (item->hti_data); in ht_find_locked()
105 struct ht_item *item; in ht_add() local
113 TAILQ_FOREACH(item, &entry->hte_items, hti_link) { in ht_add()
114 if (item->hti_hash == hash) { in ht_add()
121 item = l9p_calloc(1, sizeof(struct ht_item)); in ht_add()
122 item->hti_hash = hash; in ht_add()
123 item->hti_data = value; in ht_add()
124 TAILQ_INSERT_TAIL(&entry->hte_items, item, hti_link); in ht_add()
147 struct ht_item *item, *tmp; in ht_remove_locked() local
152 TAILQ_FOREACH_SAFE(item, &entry->hte_items, hti_link, tmp) { in ht_remove_locked()
153 if (item->hti_hash == hash) { in ht_remove_locked()
154 TAILQ_REMOVE(&entry->hte_items, item, hti_link); in ht_remove_locked()
155 free(item); in ht_remove_locked()
211 struct ht_item *item; in ht_remove_at_iter() local
218 if ((item = iter->htit_curr) == NULL) { in ht_remove_at_iter()
228 iter->htit_next = ht_iter_advance(iter, item); in ht_remove_at_iter()
229 TAILQ_REMOVE(&h->ht_entries[slot].hte_items, item, hti_link); in ht_remove_at_iter()
234 free(item); in ht_remove_at_iter()
262 struct ht_item *item; in ht_next() local
265 if ((item = iter->htit_next) == NULL) { in ht_next()
270 item = ht_iter_advance(iter, iter->htit_curr); in ht_next()
274 iter->htit_curr = item; in ht_next()
275 return (item == NULL ? NULL : item->hti_data); in ht_next()