Changeset 80bcaed in mainline for kernel/generic/include/adt/list.h


Ignore:
Timestamp:
2007-02-03T13:22:24Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f619ec11
Parents:
fa8e7d2
Message:

Merge as_t structure into one and leave the differring parts in as_genarch_t.

Indentation and formatting changes in header files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/adt/list.h

    rfa8e7d2 r80bcaed  
    4848 * @param name Name of the new statically allocated list.
    4949 */
    50 #define LIST_INITIALIZE(name)           link_t name = { .prev = &name, .next = &name }
     50#define LIST_INITIALIZE(name) \
     51        link_t name = { .prev = &name, .next = &name }
    5152
    5253/** Initialize doubly-linked circular list link
     
    108109 * Remove item from doubly-linked circular list.
    109110 *
    110  * @param link Pointer to link_t structure to be removed from the list it is contained in.
     111 * @param link  Pointer to link_t structure to be removed from the list it is
     112 *              contained in.
    111113 */
    112114static inline void list_remove(link_t *link)
     
    136138 * concatenates splitted lists and splits concatenated lists.
    137139 *
    138  * @param part1 Pointer to link_t structure leading the first (half of the headless) list.
    139  * @param part2 Pointer to link_t structure leading the second (half of the headless) list.
     140 * @param part1 Pointer to link_t structure leading the first (half of the
     141 *              headless) list.
     142 * @param part2 Pointer to link_t structure leading the second (half of the
     143 *              headless) list.
    140144 */
    141145static inline void headless_list_split_or_concat(link_t *part1, link_t *part2)
     
    155159 * Split headless doubly-linked circular list.
    156160 *
    157  * @param part1 Pointer to link_t structure leading the first half of the headless list.
    158  * @param part2 Pointer to link_t structure leading the second half of the headless list.
     161 * @param part1 Pointer to link_t structure leading the first half of the
     162 *              headless list.
     163 * @param part2 Pointer to link_t structure leading the second half of the
     164 *              headless list.
    159165 */
    160166static inline void headless_list_split(link_t *part1, link_t *part2)
     
    168174 *
    169175 * @param part1 Pointer to link_t structure leading the first headless list.
    170  * @param part2 Pointer to link_t structure leading the second headless list. 
     176 * @param part2 Pointer to link_t structure leading the second headless list.
    171177 */
    172178static inline void headless_list_concat(link_t *part1, link_t *part2)
     
    175181}
    176182
    177 #define list_get_instance(link,type,member) (type *)(((uint8_t*)(link))-((uint8_t*)&(((type *)NULL)->member)))
     183#define list_get_instance(link,type,member) \
     184        ((type *)(((uint8_t *)(link)) - ((uint8_t *)&(((type *)NULL)->member))))
    178185
    179186extern bool list_member(const link_t *link, const link_t *head);
Note: See TracChangeset for help on using the changeset viewer.