Changes in kernel/generic/src/adt/hash_table.c [a35b458:30f1a25] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/adt/hash_table.c
ra35b458 r30f1a25 269 269 270 270 /** Find the next item equal to item. */ 271 ht_link_t *hash_table_find_next(const hash_table_t *h, ht_link_t *item) 271 ht_link_t * 272 hash_table_find_next(const hash_table_t *h, ht_link_t *first, ht_link_t *item) 272 273 { 273 274 assert(item); 274 275 assert(h && h->bucket); 275 276 277 size_t idx = h->op->hash(item) % h->bucket_cnt; 278 276 279 /* Traverse the circular list until we reach the starting item again. */ 277 for (link_t *cur = item->link.next; cur != &item->link; cur = cur->next) { 280 for (link_t *cur = item->link.next; cur != &first->link; 281 cur = cur->next) { 278 282 assert(cur); 283 284 if (cur == &h->bucket[idx].head) 285 continue; 286 279 287 ht_link_t *cur_link = member_to_inst(cur, ht_link_t, link); 280 288 /*
Note:
See TracChangeset
for help on using the changeset viewer.