Changeset 58775d30 in mainline for uspace/lib/c/include/adt/list.h


Ignore:
Timestamp:
2015-03-16T16:07:21Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2003739
Parents:
6069061 (diff), 795e2bf (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.
Message:

Mainline changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/adt/list.h

    r6069061 r58775d30  
    5858 */
    5959#define LIST_INITIALIZE(name) \
    60         list_t name = { \
     60        list_t name = LIST_INITIALIZER(name)
     61
     62/** Initializer for statically allocated list.
     63 *
     64 * @code
     65 * struct named_list {
     66 *     const char *name;
     67 *     list_t list;
     68 * } var = {
     69 *     .name = "default name",
     70 *     .list = LIST_INITIALIZER(name_list.list)
     71 * };
     72 * @endcode
     73 *
     74 * @param name Name of the new statically allocated list.
     75 *
     76 */
     77#define LIST_INITIALIZER(name) \
     78        { \
    6179                .head = { \
    6280                        .prev = &(name).head, \
Note: See TracChangeset for help on using the changeset viewer.