• Home
  • Raw
  • Download

Lines Matching refs:entry

95 entry_is_free(const struct hash_entry *entry)  in entry_is_free()  argument
97 return entry->key == NULL; in entry_is_free()
101 entry_is_deleted(const struct hash_table *ht, struct hash_entry *entry) in entry_is_deleted() argument
103 return entry->key == ht->deleted_key; in entry_is_deleted()
107 entry_is_present(const struct hash_table *ht, struct hash_entry *entry) in entry_is_present() argument
109 return entry->key != NULL && entry->key != ht->deleted_key; in entry_is_present()
151 void (*delete_function)(struct hash_entry *entry)) in _mesa_hash_table_destroy() argument
157 struct hash_entry *entry; in _mesa_hash_table_destroy() local
159 hash_table_foreach(ht, entry) { in _mesa_hash_table_destroy()
160 delete_function(entry); in _mesa_hash_table_destroy()
174 void (*delete_function)(struct hash_entry *entry)) in _mesa_hash_table_clear() argument
176 struct hash_entry *entry; in _mesa_hash_table_clear() local
178 for (entry = ht->table; entry != ht->table + ht->size; entry++) { in _mesa_hash_table_clear()
179 if (entry->key == NULL) in _mesa_hash_table_clear()
182 if (delete_function != NULL && entry->key != ht->deleted_key) in _mesa_hash_table_clear()
183 delete_function(entry); in _mesa_hash_table_clear()
185 entry->key = NULL; in _mesa_hash_table_clear()
217 struct hash_entry *entry = ht->table + hash_address; in hash_table_search() local
219 if (entry_is_free(entry)) { in hash_table_search()
221 } else if (entry_is_present(ht, entry) && entry->hash == hash) { in hash_table_search()
222 if (ht->key_equals_function(key, entry->key)) { in hash_table_search()
223 return entry; in hash_table_search()
264 struct hash_entry *table, *entry; in _mesa_hash_table_rehash() local
284 hash_table_foreach(&old_ht, entry) { in _mesa_hash_table_rehash()
285 hash_table_insert(ht, entry->hash, entry->key, entry->data); in _mesa_hash_table_rehash()
309 struct hash_entry *entry = ht->table + hash_address; in hash_table_insert() local
312 if (!entry_is_present(ht, entry)) { in hash_table_insert()
315 available_entry = entry; in hash_table_insert()
316 if (entry_is_free(entry)) in hash_table_insert()
331 if (!entry_is_deleted(ht, entry) && in hash_table_insert()
332 entry->hash == hash && in hash_table_insert()
333 ht->key_equals_function(key, entry->key)) { in hash_table_insert()
334 entry->key = key; in hash_table_insert()
335 entry->data = data; in hash_table_insert()
336 return entry; in hash_table_insert()
390 struct hash_entry *entry) in _mesa_hash_table_remove() argument
392 if (!entry) in _mesa_hash_table_remove()
395 entry->key = ht->deleted_key; in _mesa_hash_table_remove()
408 struct hash_entry *entry) in _mesa_hash_table_next_entry() argument
410 if (entry == NULL) in _mesa_hash_table_next_entry()
411 entry = ht->table; in _mesa_hash_table_next_entry()
413 entry = entry + 1; in _mesa_hash_table_next_entry()
415 for (; entry != ht->table + ht->size; entry++) { in _mesa_hash_table_next_entry()
416 if (entry_is_present(ht, entry)) { in _mesa_hash_table_next_entry()
417 return entry; in _mesa_hash_table_next_entry()
434 bool (*predicate)(struct hash_entry *entry)) in _mesa_hash_table_random_entry() argument
436 struct hash_entry *entry; in _mesa_hash_table_random_entry() local
442 for (entry = ht->table + i; entry != ht->table + ht->size; entry++) { in _mesa_hash_table_random_entry()
443 if (entry_is_present(ht, entry) && in _mesa_hash_table_random_entry()
444 (!predicate || predicate(entry))) { in _mesa_hash_table_random_entry()
445 return entry; in _mesa_hash_table_random_entry()
449 for (entry = ht->table; entry != ht->table + i; entry++) { in _mesa_hash_table_random_entry()
450 if (entry_is_present(ht, entry) && in _mesa_hash_table_random_entry()
451 (!predicate || predicate(entry))) { in _mesa_hash_table_random_entry()
452 return entry; in _mesa_hash_table_random_entry()