RTEMS CPU Kit with SuperCore  4.11.3
Data Structures | Macros | Functions
drvmgr_list.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  drvmgr_list
 List description, Singly link list with head and tail pointers. More...
 

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)
 Initialize a list during runtime. More...
 
void drvmgr_list_empty (struct drvmgr_list *list)
 Clear list.
 
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_remove_head (struct drvmgr_list *list)
 Remove entry from front of list.
 
void drvmgr_list_remove (struct drvmgr_list *list, void *entry)
 Remove entry from anywhere in list.
 

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: nfs_prot.h:234

Function Documentation

◆ 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

References drvmgr_list_empty(), drvmgr_list::head, drvmgr_list::ofs, and drvmgr_list::tail.