diff options
| -rw-r--r-- | include/list.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/list.h b/include/list.h index b98a889e..ad87b45b 100644 --- a/include/list.h +++ b/include/list.h @@ -32,6 +32,12 @@ typedef struct list_head list_t; (ptr)->prev = (ptr); \ }) +static inline int +list_empty(const struct list_head *head) +{ + return head->next == head; +} + static inline void __list_add(struct list_head *new, struct list_head *prev, struct list_head *next) |
