summaryrefslogtreecommitdiffstats
path: root/src/util/hash_table.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/hash_table.h')
-rw-r--r--src/util/hash_table.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/util/hash_table.h b/src/util/hash_table.h
index c7f577665dc..cf939130fcf 100644
--- a/src/util/hash_table.h
+++ b/src/util/hash_table.h
@@ -153,6 +153,31 @@ hash_table_call_foreach(struct hash_table *ht,
callback(entry->key, entry->data, closure);
}
+/**
+ * Hash table wrapper which supports 64-bit keys.
+ */
+struct hash_table_u64 {
+ struct hash_table *table;
+ void *deleted_key_data;
+};
+
+struct hash_table_u64 *
+_mesa_hash_table_u64_create(void *mem_ctx);
+
+void
+_mesa_hash_table_u64_destroy(struct hash_table_u64 *ht,
+ void (*delete_function)(struct hash_entry *entry));
+
+void
+_mesa_hash_table_u64_insert(struct hash_table_u64 *ht, uint64_t key,
+ void *data);
+
+void *
+_mesa_hash_table_u64_search(struct hash_table_u64 *ht, uint64_t key);
+
+void
+_mesa_hash_table_u64_remove(struct hash_table_u64 *ht, uint64_t key);
+
#ifdef __cplusplus
} /* extern C */
#endif