Changeset 30eab78 in mainline for uspace/lib/c/include/adt/list.h
- Timestamp:
- 2017-06-27T17:14:57Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 39b0a51
- Parents:
- b76ce3f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/adt/list.h
rb76ce3f r30eab78 54 54 55 55 extern bool list_member(const link_t *, const list_t *); 56 extern void list_ concat(list_t *, list_t *);56 extern void list_splice(list_t *, link_t *); 57 57 extern unsigned long list_count(const list_t *); 58 58 … … 351 351 } 352 352 353 /** Concatenate two lists 354 * 355 * Concatenate lists @a list1 and @a list2, producing a single 356 * list @a list1 containing items from both (in @a list1, @a list2 357 * order) and empty list @a list2. 358 * 359 * @param list1 First list and concatenated output 360 * @param list2 Second list and empty output. 361 * 362 */ 363 NO_TRACE static inline void list_concat(list_t *list1, list_t *list2) 364 { 365 list_splice(list2, list1->head.prev); 366 } 367 353 368 /** Get n-th item in a list. 354 369 * … … 399 414 } 400 415 401 402 416 #endif 403 417
Note:
See TracChangeset
for help on using the changeset viewer.