Changeset d5a89a3 in mainline for uspace/lib/c/include/adt/list.h
- Timestamp:
- 2019-02-11T22:31:04Z (6 years ago)
- Children:
- aaf9789c
- Parents:
- e3272101 (diff), 4805495 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/adt/list.h
re3272101 rd5a89a3 34 34 */ 35 35 36 #ifndef LIBC_LIST_H_37 #define LIBC_LIST_H_36 #ifndef _LIBC_LIST_H_ 37 #define _LIBC_LIST_H_ 38 38 39 39 #include <assert.h> … … 151 151 * 152 152 */ 153 NO_TRACE static inline void link_initialize(link_t *link)153 _NO_TRACE static inline void link_initialize(link_t *link) 154 154 { 155 155 link->prev = NULL; … … 164 164 * 165 165 */ 166 NO_TRACE static inline void list_initialize(list_t *list)166 _NO_TRACE static inline void list_initialize(list_t *list) 167 167 { 168 168 list->head.prev = &list->head; … … 200 200 * 201 201 */ 202 NO_TRACE static inline void list_prepend(link_t *link, list_t *list)202 _NO_TRACE static inline void list_prepend(link_t *link, list_t *list) 203 203 { 204 204 list_insert_after(link, &list->head); … … 213 213 * 214 214 */ 215 NO_TRACE static inline void list_append(link_t *link, list_t *list)215 _NO_TRACE static inline void list_append(link_t *link, list_t *list) 216 216 { 217 217 list_insert_before(link, &list->head); … … 226 226 * 227 227 */ 228 NO_TRACE static inline void list_remove(link_t *link)228 _NO_TRACE static inline void list_remove(link_t *link) 229 229 { 230 230 if ((link->prev != NULL) && (link->next != NULL)) { … … 243 243 * 244 244 */ 245 NO_TRACE static inline bool list_empty(const list_t *list)245 _NO_TRACE static inline bool list_empty(const list_t *list) 246 246 { 247 247 return (list->head.next == &list->head); … … 311 311 * 312 312 */ 313 NO_TRACE static inline void headless_list_split_or_concat(link_t *part1, link_t *part2)313 _NO_TRACE static inline void headless_list_split_or_concat(link_t *part1, link_t *part2) 314 314 { 315 315 part1->prev->next = part2; … … 332 332 * 333 333 */ 334 NO_TRACE static inline void headless_list_split(link_t *part1, link_t *part2)334 _NO_TRACE static inline void headless_list_split(link_t *part1, link_t *part2) 335 335 { 336 336 headless_list_split_or_concat(part1, part2); … … 347 347 * 348 348 */ 349 NO_TRACE static inline void headless_list_concat(link_t *part1, link_t *part2)349 _NO_TRACE static inline void headless_list_concat(link_t *part1, link_t *part2) 350 350 { 351 351 headless_list_split_or_concat(part1, part2); … … 362 362 * 363 363 */ 364 NO_TRACE static inline void list_concat(list_t *list1, list_t *list2)364 _NO_TRACE static inline void list_concat(list_t *list1, list_t *list2) 365 365 { 366 366 list_splice(list2, list1->head.prev);
Note:
See TracChangeset
for help on using the changeset viewer.