4 #include <linux/stddef.h>
5 #include <linux/poison.h>
6 #include <linux/prefetch.h>
7 #include <asm/system.h>
10 struct xlist_head *next;
13 static inline void INIT_XLIST_HEAD(struct xlist_head *list)
18 static inline int xlist_empty(struct xlist_head *head)
20 return head->next == NULL;
23 static inline void xlist_add(struct xlist_head *new, struct xlist_head *tail,
24 struct xlist_head *head)
26 struct xlist_head *cur;
27 struct xlist_head *check;
32 check = cmpxchg(&head->next, cur, new);
38 static inline struct xlist_head *xlist_del_head(struct xlist_head *head)
40 struct xlist_head *cur;
41 struct xlist_head *check;
42 struct xlist_head *next;
50 check = cmpxchg(&head->next, cur, next);
58 static inline struct xlist_head *xlist_del_head_fast(struct xlist_head *head)
60 struct xlist_head *cur;
66 head->next = cur->next;
70 static inline void xlist_splice(struct xlist_head *list,
71 struct xlist_head *head)
73 struct xlist_head *cur;
76 cur = xchg(&list->next, NULL);