Lines Matching refs:bucket
179 __glxHashBucketPtr bucket; in __glxHashDestroy() local
187 for (bucket = table->buckets[i]; bucket;) { in __glxHashDestroy()
188 next = bucket->next; in __glxHashDestroy()
189 HASH_FREE(bucket); in __glxHashDestroy()
190 bucket = next; in __glxHashDestroy()
205 __glxHashBucketPtr bucket; in HashFind() local
210 for (bucket = table->buckets[hash]; bucket; bucket = bucket->next) { in HashFind()
211 if (bucket->key == key) { in HashFind()
214 prev->next = bucket->next; in HashFind()
215 bucket->next = table->buckets[hash]; in HashFind()
216 table->buckets[hash] = bucket; in HashFind()
222 return bucket; in HashFind()
224 prev = bucket; in HashFind()
234 __glxHashBucketPtr bucket; in __glxHashLookup() local
239 bucket = HashFind(table, key, NULL); in __glxHashLookup()
240 if (!bucket) in __glxHashLookup()
242 *value = bucket->value; in __glxHashLookup()
250 __glxHashBucketPtr bucket; in __glxHashInsert() local
259 bucket = HASH_ALLOC(sizeof(*bucket)); in __glxHashInsert()
260 if (!bucket) in __glxHashInsert()
262 bucket->key = key; in __glxHashInsert()
263 bucket->value = value; in __glxHashInsert()
264 bucket->next = table->buckets[hash]; in __glxHashInsert()
265 table->buckets[hash] = bucket; in __glxHashInsert()
267 printf("Inserted %d at %d/%p\n", key, hash, bucket); in __glxHashInsert()
277 __glxHashBucketPtr bucket; in __glxHashDelete() local
282 bucket = HashFind(table, key, &hash); in __glxHashDelete()
284 if (!bucket) in __glxHashDelete()
287 table->buckets[hash] = bucket->next; in __glxHashDelete()
288 HASH_FREE(bucket); in __glxHashDelete()
337 count_entries(__glxHashBucketPtr bucket) in count_entries() argument
341 for (; bucket; bucket = bucket->next) in count_entries()
359 __glxHashBucketPtr bucket; in compute_dist() local
365 bucket = table->buckets[i]; in compute_dist()
366 update_dist(count_entries(bucket)); in compute_dist()