diff options
| author | riastradh <riastradh@NetBSD.org> | 2021-12-19 01:46:23 +0000 |
|---|---|---|
| committer | riastradh <riastradh@NetBSD.org> | 2021-12-19 01:46:23 +0000 |
| commit | 4589dfbc232166f1e5d9efaae8ebe202e2a8cd19 (patch) | |
| tree | 5b97c7ba4d7b3ed6ae0b3c573af275183ff9d0ec /sys/external/bsd/common/include/linux | |
| parent | 3192bf9a329ef2b266a9d22d0dfd72c32452305c (diff) | |
list_is_last
Diffstat (limited to 'sys/external/bsd/common/include/linux')
| -rw-r--r-- | sys/external/bsd/common/include/linux/list.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/external/bsd/common/include/linux/list.h b/sys/external/bsd/common/include/linux/list.h index 6e87336b82e..5a748f6c960 100644 --- a/sys/external/bsd/common/include/linux/list.h +++ b/sys/external/bsd/common/include/linux/list.h @@ -1,4 +1,4 @@ -/* $NetBSD: list.h,v 1.21 2021/12/19 01:44:41 riastradh Exp $ */ +/* $NetBSD: list.h,v 1.22 2021/12/19 01:46:23 riastradh Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -107,6 +107,12 @@ list_is_singular(const struct list_head *head) return true; } +static inline bool +list_is_last(const struct list_head *entry, const struct list_head *head) +{ + return head == entry->next; +} + static inline void __list_add_between(struct list_head *prev, struct list_head *node, struct list_head *next) |
