Encapsulated conf API

This commit is contained in:
Abramo Bagnara 2001-02-07 11:34:33 +00:00
parent 8f0cb26fdf
commit 3e091c8822
26 changed files with 473 additions and 404 deletions

View file

@ -144,4 +144,14 @@ static __inline__ void list_splice(struct list_head *list, struct list_head *hea
#define list_for_each(pos, head) \
for (pos = (head)->next; pos != (head); pos = pos->next)
/**
* list_entry - get the struct for this entry
* @ptr: the &struct list_head pointer.
* @type: the type of the struct this is embedded in.
* @member: the name of the list_struct within the struct.
*/
#define list_entry(ptr, type, member) \
((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member)))
#endif /* _LIST_H */