mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
mesa/main: Remove _mesa_HashClone()
I didn't find this being used anywhere. Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Reviewed-by: Timothy Arceri <t_arceri@yahoo.com.au> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
This commit is contained in:
parent
bd38f91f8d
commit
fd00c738c0
2 changed files with 0 additions and 31 deletions
|
|
@ -388,34 +388,6 @@ _mesa_HashDeleteAll(struct _mesa_HashTable *table,
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Clone all entries in a hash table, into a new table.
|
||||
*
|
||||
* \param table the hash table to clone
|
||||
*/
|
||||
struct _mesa_HashTable *
|
||||
_mesa_HashClone(const struct _mesa_HashTable *table)
|
||||
{
|
||||
/* cast-away const */
|
||||
struct _mesa_HashTable *table2 = (struct _mesa_HashTable *) table;
|
||||
struct hash_entry *entry;
|
||||
struct _mesa_HashTable *clonetable;
|
||||
|
||||
assert(table);
|
||||
mtx_lock(&table2->Mutex);
|
||||
|
||||
clonetable = _mesa_NewHashTable();
|
||||
assert(clonetable);
|
||||
hash_table_foreach(table->ht, entry) {
|
||||
_mesa_HashInsert(clonetable, (GLint)(uintptr_t)entry->key, entry->data);
|
||||
}
|
||||
|
||||
mtx_unlock(&table2->Mutex);
|
||||
|
||||
return clonetable;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Walk over all entries in a hash table, calling callback function for each.
|
||||
* Note: we use a separate mutex in this function to avoid a recursive
|
||||
|
|
|
|||
|
|
@ -59,9 +59,6 @@ _mesa_HashDeleteAll(struct _mesa_HashTable *table,
|
|||
void (*callback)(GLuint key, void *data, void *userData),
|
||||
void *userData);
|
||||
|
||||
extern struct _mesa_HashTable *
|
||||
_mesa_HashClone(const struct _mesa_HashTable *table);
|
||||
|
||||
extern void
|
||||
_mesa_HashWalk(const struct _mesa_HashTable *table,
|
||||
void (*callback)(GLuint key, void *data, void *userData),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue