RTEMS 6.1-rc6
Loading...
Searching...
No Matches
Data Structures | Macros | Functions
drvmgr_list.h File Reference

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)
 

Detailed Description

Linked list help functions used by driver manager.

Macro Definition Documentation

◆ LIST_FOR_EACH

#define LIST_FOR_EACH (   list,
  entry,
  type 
)
Value:
for (entry = LIST_HEAD(list, type); \
entry; \
entry = LIST_NEXT(list, entry, type))
Definition: mmu-config.c:53

Function Documentation

◆ drvmgr_list_add_head()

void drvmgr_list_add_head ( struct drvmgr_list list,
void *  entry 
)

Add entry to front of list

◆ drvmgr_list_add_tail()

void drvmgr_list_add_tail ( struct drvmgr_list list,
void *  entry 
)

Add entry to end of list

◆ drvmgr_list_empty()

void drvmgr_list_empty ( struct drvmgr_list list)

Clear list

◆ drvmgr_list_init()

void drvmgr_list_init ( struct drvmgr_list list,
int  offset 
)

Initialize a list during runtime

Parameters
listThe list to initialize
offsetThe number of bytes into the entry structure the next pointer is found

◆ drvmgr_list_remove()

void drvmgr_list_remove ( struct drvmgr_list list,
void *  entry 
)

Remove entry from anywhere in list

◆ drvmgr_list_remove_head()

void drvmgr_list_remove_head ( struct drvmgr_list list)

Remove entry from front of list