Rev 534 | Rev 788 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 534 | Rev 624 | ||
---|---|---|---|
Line 30... | Line 30... | ||
30 | #define __LIST_H__ |
30 | #define __LIST_H__ |
31 | 31 | ||
32 | #include <arch/types.h> |
32 | #include <arch/types.h> |
33 | #include <typedefs.h> |
33 | #include <typedefs.h> |
34 | 34 | ||
- | 35 | /** Doubly linked list head and link type. */ |
|
35 | struct link { |
36 | struct link { |
36 | link_t *prev; |
37 | link_t *prev; /**< Pointer to the previous item in the list. */ |
37 | link_t *next; |
38 | link_t *next; /**< Pointer to the next item in the list. */ |
38 | }; |
39 | }; |
39 | 40 | ||
- | 41 | /** Declare and initialize statically allocated list. |
|
- | 42 | * |
|
- | 43 | * @param name Name of the new statically allocated list. |
|
- | 44 | */ |
|
- | 45 | #define LIST_INITIALIZE(name) link_t name = { .prev = &name, .next = &name } |
|
- | 46 | ||
40 | /** Initialize doubly-linked circular list link |
47 | /** Initialize doubly-linked circular list link |
41 | * |
48 | * |
42 | * Initialize doubly-linked list link. |
49 | * Initialize doubly-linked list link. |
43 | * |
50 | * |
44 | * @param link Pointer to link_t structure to be initialized. |
51 | * @param link Pointer to link_t structure to be initialized. |