Lines Matching refs:table
3 * Generic hash table.
47 * The hash table needs a particular pointer to be the marker for a key that
48 * was deleted from the table, along with NULL for the "never allocated in the
49 * table" marker. Legacy GL allows any GLuint to be used as a GL object name,
52 * struct hash_table. We tell the hash table to use "1" as the deleted key
53 * value, so that we test the deleted-key-in-the-table path as best we can.
66 * are never deleted, we will never see a collision in the table, because the
67 * table resizes itself when it approaches full, and thus key % table_size ==
102 * The hash table data structure.
111 /** Value that would be in the table for DELETED_KEY_VALUE. */
120 extern void _mesa_DeleteHashTable(struct _mesa_HashTable *table);
122 extern void *_mesa_HashLookup(struct _mesa_HashTable *table, GLuint key);
124 extern void _mesa_HashInsert(struct _mesa_HashTable *table, GLuint key, void *data,
127 extern void _mesa_HashRemove(struct _mesa_HashTable *table, GLuint key);
130 * Lock the hash table mutex.
133 * to be looked up in the hash table, to avoid having to lock
136 * \param table the hash table.
139 _mesa_HashLockMutex(struct _mesa_HashTable *table)
141 assert(table);
142 simple_mtx_lock(&table->Mutex);
147 * Unlock the hash table mutex.
149 * \param table the hash table.
152 _mesa_HashUnlockMutex(struct _mesa_HashTable *table)
154 assert(table);
155 simple_mtx_unlock(&table->Mutex);
158 extern void *_mesa_HashLookupLocked(struct _mesa_HashTable *table, GLuint key);
160 extern void _mesa_HashInsertLocked(struct _mesa_HashTable *table,
163 extern void _mesa_HashRemoveLocked(struct _mesa_HashTable *table, GLuint key);
166 _mesa_HashDeleteAll(struct _mesa_HashTable *table,
171 _mesa_HashWalk(const struct _mesa_HashTable *table,
176 _mesa_HashWalkLocked(const struct _mesa_HashTable *table,
180 extern void _mesa_HashPrint(const struct _mesa_HashTable *table);
182 extern GLuint _mesa_HashFindFreeKeyBlock(struct _mesa_HashTable *table, GLuint numKeys);
185 _mesa_HashFindFreeKeys(struct _mesa_HashTable *table, GLuint* keys, GLuint numKeys);
188 _mesa_HashNumEntries(const struct _mesa_HashTable *table);
192 extern void _mesa_HashEnableNameReuse(struct _mesa_HashTable *table);
195 _mesa_HashWalkMaybeLocked(const struct _mesa_HashTable *table,
200 _mesa_HashWalkLocked(table, callback, userData);
202 _mesa_HashWalk(table, callback, userData);
206 _mesa_HashLookupMaybeLocked(struct _mesa_HashTable *table, GLuint key,
210 return _mesa_HashLookupLocked(table, key);
212 return _mesa_HashLookup(table, key);
216 _mesa_HashInsertMaybeLocked(struct _mesa_HashTable *table,
221 _mesa_HashInsertLocked(table, key, data, isGenName);
223 _mesa_HashInsert(table, key, data, isGenName);
227 _mesa_HashLockMaybeLocked(struct _mesa_HashTable *table, bool locked)
230 _mesa_HashLockMutex(table);
234 _mesa_HashUnlockMaybeLocked(struct _mesa_HashTable *table, bool locked)
237 _mesa_HashUnlockMutex(table);