diff options
| author | riastradh <riastradh@NetBSD.org> | 2021-12-19 11:36:32 +0000 |
|---|---|---|
| committer | riastradh <riastradh@NetBSD.org> | 2021-12-19 11:36:32 +0000 |
| commit | b4bb4e6a6d38802646e871acdaaf2c14a1cef62d (patch) | |
| tree | 90281a49dcd5e1fcd87495522c714a4c52887a20 /sys/external/bsd/common/include/linux | |
| parent | 16f55ef0bd00a83cb58ac7d0156660228918c7f9 (diff) | |
linux/list.h: Add list_safe_reset_next.
Diffstat (limited to 'sys/external/bsd/common/include/linux')
| -rw-r--r-- | sys/external/bsd/common/include/linux/list.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/external/bsd/common/include/linux/list.h b/sys/external/bsd/common/include/linux/list.h index 68b5843506f..3bf19afa948 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.28 2021/12/19 11:32:08 riastradh Exp $ */ +/* $NetBSD: list.h,v 1.29 2021/12/19 11:36:32 riastradh Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -107,7 +107,6 @@ static inline bool list_is_first(const struct list_head *entry, const struct list_head *head) { return head == entry->prev; - } static inline bool @@ -273,6 +272,9 @@ list_del_init(struct list_head *node) ((VAR) != (HEAD)) && ((NEXT) = list_next((VAR)), 1); \ (VAR) = (NEXT)) +#define list_safe_reset_next(VAR, NEXT, FIELD) \ + (NEXT) = list_next_entry(VAR, FIELD) + #define list_for_each_entry(VAR, HEAD, FIELD) \ for ((VAR) = list_entry(list_first((HEAD)), typeof(*(VAR)), FIELD); \ &(VAR)->FIELD != (HEAD); \ |
