RTEMS 6.1-rc4
|
Linked list help functions used by driver manager. More...
Go to the source code of this file.
Data Structures | |
struct | drvmgr_list |
Macros | |
#define | LIST_INITIALIZER(type, field) {NULL, NULL, offsetof(type, field)} |
#define | LIST_HEAD(list, type) ((type *)(list)->head) |
#define | LIST_TAIL(list, type) ((type *)(list)->tail) |
#define | LIST_FIELD(list, entry) (*(void **)((char *)(entry) + (list)->ofs)) |
#define | LIST_NEXT(list, entry, type) ((type *)(LIST_FIELD(list, entry))) |
#define | LIST_FOR_EACH(list, entry, type) |
Functions | |
void | drvmgr_list_init (struct drvmgr_list *list, int offset) |
void | drvmgr_list_empty (struct drvmgr_list *list) |
void | drvmgr_list_add_head (struct drvmgr_list *list, void *entry) |
void | drvmgr_list_add_tail (struct drvmgr_list *list, void *entry) |
void | drvmgr_list_remove_head (struct drvmgr_list *list) |
void | drvmgr_list_remove (struct drvmgr_list *list, void *entry) |
Linked list help functions used by driver manager.
#define LIST_FOR_EACH | ( | list, | |
entry, | |||
type | |||
) |
void drvmgr_list_add_head | ( | struct drvmgr_list * | list, |
void * | entry | ||
) |
Add entry to front of list
void drvmgr_list_add_tail | ( | struct drvmgr_list * | list, |
void * | entry | ||
) |
Add entry to end of list
void drvmgr_list_empty | ( | struct drvmgr_list * | list | ) |
Clear list
void drvmgr_list_init | ( | struct drvmgr_list * | list, |
int | offset | ||
) |
Initialize a list during runtime
list | The list to initialize |
offset | The number of bytes into the entry structure the next pointer is found |
void drvmgr_list_remove | ( | struct drvmgr_list * | list, |
void * | entry | ||
) |
Remove entry from anywhere in list
void drvmgr_list_remove_head | ( | struct drvmgr_list * | list | ) |
Remove entry from front of list