diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/llist.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/llist.h b/include/linux/llist.h index a5199f6d0e82..30019d8fa4e2 100644 --- a/include/linux/llist.h +++ b/include/linux/llist.h @@ -57,6 +57,7 @@ #include <linux/kernel.h> #include <asm/cmpxchg.h> +#include <asm/relaxed.h> struct llist_head { struct llist_node *first; @@ -137,6 +138,11 @@ static inline bool llist_empty(const struct llist_head *head) return ACCESS_ONCE(head->first) == NULL; } +static inline bool llist_empty_relaxed(const struct llist_head *head) +{ + return (void *)cpu_relaxed_read_long(&head->first) == NULL; +} + static inline struct llist_node *llist_next(struct llist_node *node) { return node->next; |
