Changeset ca62f86 in mainline for kernel/generic/include/adt/list.h
- Timestamp:
- 2013-09-09T17:52:40Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f7bb6d1
- Parents:
- 6ad185d (diff), a1ecb88 (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
-
kernel/generic/include/adt/list.h
r6ad185d rca62f86 1 1 /* 2 2 * Copyright (c) 2001-2004 Jakub Jermar 3 * Copyright (c) 201 1Jiri Svoboda3 * Copyright (c) 2013 Jiri Svoboda 4 4 * All rights reserved. 5 5 * … … 65 65 66 66 #define list_get_instance(link, type, member) \ 67 ((type *) (((void *)(link)) - ((void *)&(((type *) NULL)->member))))67 ((type *) (((void *)(link)) - list_link_to_void(&(((type *) NULL)->member)))) 68 68 69 69 #define list_foreach(list, iterator) \ … … 281 281 } 282 282 283 /** Verify that argument type is a pointer to link_t (at compile time). 284 * 285 * This can be used to check argument type in a macro. 286 */ 287 static inline const void *list_link_to_void(const link_t *link) 288 { 289 return link; 290 } 291 283 292 extern int list_member(const link_t *, const list_t *); 284 293 extern void list_concat(list_t *, list_t *);
Note:
See TracChangeset
for help on using the changeset viewer.