Changeset b4b534ac in mainline for uspace/lib/c/include/adt/list.h
- Timestamp:
- 2016-07-22T08:24:47Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f76d2c2
- Parents:
- 5b18137 (diff), 8351f9a4 (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
r5b18137 rb4b534ac 133 133 134 134 /** Returns true if the link is definitely part of a list. False if not sure. */ 135 static inline bool link_in_use( link_t *link)135 static inline bool link_in_use(const link_t *link) 136 136 { 137 137 return link->prev != NULL && link->next != NULL; … … 263 263 * 264 264 */ 265 static inline link_t *list_last( list_t *list)265 static inline link_t *list_last(const list_t *list) 266 266 { 267 267 return (list->head.prev == &list->head) ? NULL : list->head.prev; … … 276 276 * 277 277 */ 278 static inline link_t *list_next( link_t *link, const list_t *list)278 static inline link_t *list_next(const link_t *link, const list_t *list) 279 279 { 280 280 return (link->next == &list->head) ? NULL : link->next; … … 289 289 * 290 290 */ 291 static inline link_t *list_prev( link_t *link, const list_t *list)291 static inline link_t *list_prev(const link_t *link, const list_t *list) 292 292 { 293 293 return (link->prev == &list->head) ? NULL : link->prev; … … 357 357 * 358 358 */ 359 static inline link_t *list_nth( list_t *list, unsigned long n)359 static inline link_t *list_nth(const list_t *list, unsigned long n) 360 360 { 361 361 unsigned long cnt = 0;
Note:
See TracChangeset
for help on using the changeset viewer.