7 #ifdef __compiler_offsetof 8 #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER) 10 #define offsetof(TYPE, MEMBER) ((size_t) & ((TYPE *)0)->MEMBER) 13 #define container_of(ptr, type, member) \ 15 const typeof(((type *)0)->member) *__mptr = (ptr); \ 16 (type *)((char *)__mptr - offsetof(type, member)); \ 33 #define FLIST_HEAD_INIT(name) \ 38 #define FLIST_HEAD(name) struct flist_head name = FLIST_HEAD_INIT(name) 40 #define INIT_FLIST_HEAD(ptr) \ 42 (ptr)->next = (ptr); \ 43 (ptr)->prev = (ptr); \ 55 next->
prev = new_entry;
58 prev->
next = new_entry;
123 return head->
next == head;
162 #define flist_entry(ptr, type, member) container_of(ptr, type, member) 169 #define flist_for_each(pos, head) \ 170 for (pos = (head)->next; pos != (head); pos = pos->next) 178 #define flist_for_each_safe(pos, n, head) \ 179 for (pos = (head)->next, n = pos->next; pos != (head); \ 180 pos = n, n = pos->next) void flist_sort(void *priv, struct flist_head *head, int(*cmp)(void *priv, struct flist_head *a, struct flist_head *b))
static void flist_del(struct flist_head *entry)
Definition: flist.h:100
static void __flist_splice(const struct flist_head *list, struct flist_head *prev, struct flist_head *next)
Definition: flist.h:126
static int flist_empty(const struct flist_head *head)
Definition: flist.h:121
static void flist_add(struct flist_head *new_entry, struct flist_head *head)
Definition: flist.h:69
struct flist_head * prev
Definition: flist.h:30
static void flist_splice(const struct flist_head *list, struct flist_head *head)
Definition: flist.h:140
static void flist_splice_init(struct flist_head *list, struct flist_head *head)
Definition: flist.h:147
static void __flist_add(struct flist_head *new_entry, struct flist_head *prev, struct flist_head *next)
Definition: flist.h:52
static void __flist_del(struct flist_head *prev, struct flist_head *next)
Definition: flist.h:88
#define INIT_FLIST_HEAD(ptr)
Definition: flist.h:40
struct flist_head * next
Definition: flist.h:30
static void flist_add_tail(struct flist_head *new_entry, struct flist_head *head)
Definition: flist.h:75
static void flist_del_init(struct flist_head *entry)
Definition: flist.h:111