• Home
  • Raw
  • Download

Lines Matching refs:util_node

73 struct util_node {  struct
74 struct util_node *next; argument
80 struct util_node *fakeNext; argument
81 struct util_node **buckets;
92 struct util_node *e;
101 static void util_free_node(struct util_node *node) in util_free_node()
106 static struct util_node *
109 struct util_node **anextNode) in util_hash_create_node()
111 struct util_node *node = util_data_allocate_node(hash->data.d); in util_hash_create_node()
119 node->next = (struct util_node*)(*anextNode); in util_hash_create_node()
139 struct util_node *e = (struct util_node *)(hash); in util_data_rehash()
140 struct util_node **oldBuckets = hash->buckets; in util_data_rehash()
146 hash->buckets = malloc(sizeof(struct util_node*) * hash->numBuckets); in util_data_rehash()
151 struct util_node *firstNode = oldBuckets[i]; in util_data_rehash()
154 struct util_node *lastNode = firstNode; in util_data_rehash()
155 struct util_node *afterLastNode; in util_data_rehash()
156 struct util_node **beforeFirstNode; in util_data_rehash()
189 static struct util_node *util_data_first_node(struct util_hash_data *hash) in util_data_first_node()
191 struct util_node *e = (struct util_node *)(hash); in util_data_first_node()
192 struct util_node **bucket = hash->buckets; in util_data_first_node()
202 static struct util_node **util_hash_find_node(struct util_hash *hash, unsigned akey) in util_hash_find_node()
204 struct util_node **node; in util_hash_find_node()
207 node = (struct util_node **)(&hash->data.d->buckets[akey % hash->data.d->numBuckets]); in util_hash_find_node()
212 node = (struct util_node **)((const struct util_node * const *)(&hash->data.e)); in util_hash_find_node()
223 struct util_node **nextNode = util_hash_find_node(hash, key); in util_hash_insert()
224 struct util_node *node = util_hash_create_node(hash, key, data, nextNode); in util_hash_insert()
252 hash->data.d->nodeSize = sizeof(struct util_node); in util_hash_create()
262 struct util_node *e_for_x = (struct util_node *)(hash->data.d); in util_hash_delete()
263 struct util_node **bucket = (struct util_node **)(hash->data.d->buckets); in util_hash_delete()
266 struct util_node *cur = *bucket++; in util_hash_delete()
268 struct util_node *next = cur->next; in util_hash_delete()
281 struct util_node **nextNode = util_hash_find_node(hash, key); in util_hash_find()
300 static struct util_node *util_hash_data_next(struct util_node *node) in util_hash_data_next()
303 struct util_node *next; in util_hash_data_next()
304 struct util_node *e; in util_hash_data_next()
308 struct util_node **bucket; in util_hash_data_next()
346 struct util_node **node = util_hash_find_node(hash, akey); in util_hash_take()
349 struct util_node *next = (*node)->next; in util_hash_take()
369 struct util_node *node = iter.node; in util_hash_erase()
370 struct util_node **node_ptr; in util_hash_erase()
376 node_ptr = (struct util_node**)(&hash->data.d->buckets[node->key % hash->data.d->numBuckets]); in util_hash_erase()