- Timestamp:
- 2018-03-14T18:54:08Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 67f11a0
- Parents:
- 963037b0
- Location:
- uspace/lib/c
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/adt/hash_table.c
r963037b0 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); … … 277 278 278 279 /* Traverse the circular list until we reach the starting item again. */ 279 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) { 280 282 assert(cur); 281 283 -
uspace/lib/c/include/adt/hash_table.h
r963037b0 r30f1a25 95 95 extern bool hash_table_insert_unique(hash_table_t *, ht_link_t *); 96 96 extern ht_link_t *hash_table_find(const hash_table_t *, void *); 97 extern ht_link_t *hash_table_find_next(const hash_table_t *, ht_link_t *); 97 extern ht_link_t *hash_table_find_next(const hash_table_t *, ht_link_t *, 98 ht_link_t *); 98 99 extern size_t hash_table_remove(hash_table_t *, void *); 99 100 extern void hash_table_remove_item(hash_table_t *, ht_link_t *);
Note:
See TracChangeset
for help on using the changeset viewer.