• Home
  • Raw
  • Download

Lines Matching refs:entry

88 entry_is_free(struct set_entry *entry)  in entry_is_free()  argument
90 return entry->key == NULL; in entry_is_free()
94 entry_is_deleted(struct set_entry *entry) in entry_is_deleted() argument
96 return entry->key == deleted_key; in entry_is_deleted()
100 entry_is_present(struct set_entry *entry) in entry_is_present() argument
102 return entry->key != NULL && entry->key != deleted_key; in entry_is_present()
142 _mesa_set_destroy(struct set *ht, void (*delete_function)(struct set_entry *entry)) in _mesa_set_destroy() argument
148 struct set_entry *entry; in _mesa_set_destroy() local
150 set_foreach (ht, entry) { in _mesa_set_destroy()
151 delete_function(entry); in _mesa_set_destroy()
172 struct set_entry *entry = ht->table + hash_address; in set_search() local
174 if (entry_is_free(entry)) { in set_search()
176 } else if (entry_is_present(entry) && entry->hash == hash) { in set_search()
177 if (ht->key_equals_function(key, entry->key)) { in set_search()
178 return entry; in set_search()
213 struct set_entry *table, *entry; in set_rehash() local
233 for (entry = old_ht.table; in set_rehash()
234 entry != old_ht.table + old_ht.size; in set_rehash()
235 entry++) { in set_rehash()
236 if (entry_is_present(entry)) { in set_rehash()
237 set_add(ht, entry->hash, entry->key); in set_rehash()
264 struct set_entry *entry = ht->table + hash_address; in set_add() local
267 if (!entry_is_present(entry)) { in set_add()
270 available_entry = entry; in set_add()
271 if (entry_is_free(entry)) in set_add()
285 if (!entry_is_deleted(entry) && in set_add()
286 entry->hash == hash && in set_add()
287 ht->key_equals_function(key, entry->key)) { in set_add()
288 entry->key = key; in set_add()
289 return entry; in set_add()
334 _mesa_set_remove(struct set *ht, struct set_entry *entry) in _mesa_set_remove() argument
336 if (!entry) in _mesa_set_remove()
339 entry->key = deleted_key; in _mesa_set_remove()
351 _mesa_set_next_entry(const struct set *ht, struct set_entry *entry) in _mesa_set_next_entry() argument
353 if (entry == NULL) in _mesa_set_next_entry()
354 entry = ht->table; in _mesa_set_next_entry()
356 entry = entry + 1; in _mesa_set_next_entry()
358 for (; entry != ht->table + ht->size; entry++) { in _mesa_set_next_entry()
359 if (entry_is_present(entry)) { in _mesa_set_next_entry()
360 return entry; in _mesa_set_next_entry()
369 int (*predicate)(struct set_entry *entry)) in _mesa_set_random_entry() argument
371 struct set_entry *entry; in _mesa_set_random_entry() local
377 for (entry = ht->table + i; entry != ht->table + ht->size; entry++) { in _mesa_set_random_entry()
378 if (entry_is_present(entry) && in _mesa_set_random_entry()
379 (!predicate || predicate(entry))) { in _mesa_set_random_entry()
380 return entry; in _mesa_set_random_entry()
384 for (entry = ht->table; entry != ht->table + i; entry++) { in _mesa_set_random_entry()
385 if (entry_is_present(entry) && in _mesa_set_random_entry()
386 (!predicate || predicate(entry))) { in _mesa_set_random_entry()
387 return entry; in _mesa_set_random_entry()