Mine
public text v1 · immutableDeclaration of my structure:
struct my_silly_structure {
int count;
AST_LIST_ENTRY(my_silly_structure) list;
};
Declaration of list:
AST_LIST_HEAD_NOLOCK(silly_structures, my_silly_structure) silly_structures;
To initialize the list:
AST_LIST_HEAD_INIT_NOLOCK(&silly_structures);
To add to tail of list:
AST_LIST_INSERT_TAIL(&silly_structures, structure, list);
To add to head of list:
AST_LIST_INSERT_HEAD(&silly_structures, structure, list);