Lines Matching refs:bucket
31 hash_map_bucket_t *bucket; member
70 hash_map->bucket = osi_calloc(sizeof(hash_map_bucket_t) * num_bucket); in hash_map_new_internal()
71 if (hash_map->bucket == NULL) { in hash_map_new_internal()
94 osi_free(hash_map->bucket); in hash_map_free()
120 list_t *hash_bucket_list = hash_map->bucket[hash_key].list; in hash_map_has_key()
133 if (hash_map->bucket[hash_key].list == NULL) { in hash_map_set()
134 hash_map->bucket[hash_key].list = list_new_internal(bucket_free_); in hash_map_set()
135 if (hash_map->bucket[hash_key].list == NULL) { in hash_map_set()
139 list_t *hash_bucket_list = hash_map->bucket[hash_key].list; in hash_map_set()
168 list_t *hash_bucket_list = hash_map->bucket[hash_key].list; in hash_map_erase()
177 if(list_is_empty(hash_map->bucket[hash_key].list)) { in hash_map_erase()
178 list_free(hash_map->bucket[hash_key].list); in hash_map_erase()
179 hash_map->bucket[hash_key].list = NULL; in hash_map_erase()
190 list_t *hash_bucket_list = hash_map->bucket[hash_key].list; in hash_map_get()
205 if (hash_map->bucket[i].list == NULL) { in hash_map_clear()
208 list_free(hash_map->bucket[i].list); in hash_map_clear()
209 hash_map->bucket[i].list = NULL; in hash_map_clear()
219 if (hash_map->bucket[i].list == NULL) { in hash_map_foreach()
222 for (const list_node_t *iter = list_begin(hash_map->bucket[i].list); in hash_map_foreach()
223 iter != list_end(hash_map->bucket[i].list); in hash_map_foreach()