gallium: add async debug message forwarding helper
[mesa.git] / src / gallium / auxiliary / util / u_cache.h
index 835e08373494276cc211b2af4b7f414a9b36f4d7..be3631b72541c042fcc43fab57ccf43718b16a2d 100644 (file)
@@ -59,19 +59,19 @@ struct util_cache;
  * @param size maximum number of entries
  */
 struct util_cache *
-util_cache_create(uint32_t (*hash)(void *key),
-                int (*compare)(void *key1, void *key2),
-                void (*destroy)(void *key, void *value),
-                uint32_t size);
+util_cache_create(uint32_t (*hash)(const void *key),
+                  int (*compare)(const void *key1, const void *key2),
+                  void (*destroy)(void *key, void *value),
+                  uint32_t size);
 
 void
 util_cache_set(struct util_cache *cache,
-             void *key,
-             void *value);
+               void *key,
+               void *value);
 
 void *
 util_cache_get(struct util_cache *cache, 
-             void *key);
+               const void *key);
 
 void
 util_cache_clear(struct util_cache *cache);
@@ -79,6 +79,10 @@ util_cache_clear(struct util_cache *cache);
 void
 util_cache_destroy(struct util_cache *cache);
 
+void
+util_cache_remove(struct util_cache *cache,
+                  const void *key);
+
 
 #ifdef __cplusplus
 }