summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/hash.h
diff options
context:
space:
mode:
authorFredrik Höglund <[email protected]>2013-11-13 18:46:03 +0100
committerFredrik Höglund <[email protected]>2014-05-02 02:53:25 +0200
commit82291f64e378825e1c716742fc215db99fc8cbb2 (patch)
treea4ad9d2bd807e52489808a6d4eba69eaa43f1410 /src/mesa/main/hash.h
parent30af8ce3f807f8a4990fa8c750038b1f75e5154f (diff)
mesa: Add functions for doing unlocked hash table lookups
This patch adds functions for locking/unlocking the mutex, along with _mesa_HashLookupLocked() and _mesa_HashInsertLocked() that do lookups and insertions without locking the mutex. These functions will be used by the ARB_multi_bind entry points to avoid locking/unlocking the mutex for each binding point. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/hash.h')
-rw-r--r--src/mesa/main/hash.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/main/hash.h b/src/mesa/main/hash.h
index b34f32848a5..e3e8f492e8b 100644
--- a/src/mesa/main/hash.h
+++ b/src/mesa/main/hash.h
@@ -45,6 +45,15 @@ extern void _mesa_HashInsert(struct _mesa_HashTable *table, GLuint key, void *da
extern void _mesa_HashRemove(struct _mesa_HashTable *table, GLuint key);
+extern void _mesa_HashLockMutex(struct _mesa_HashTable *table);
+
+extern void _mesa_HashUnlockMutex(struct _mesa_HashTable *table);
+
+extern void *_mesa_HashLookupLocked(struct _mesa_HashTable *table, GLuint key);
+
+extern void _mesa_HashInsertLocked(struct _mesa_HashTable *table,
+ GLuint key, void *data);
+
extern void
_mesa_HashDeleteAll(struct _mesa_HashTable *table,
void (*callback)(GLuint key, void *data, void *userData),