Module Name: src
Committed By: riastradh
Date: Sun Dec 19 01:57:57 UTC 2021
Modified Files:
src/sys/external/bsd/common/include/linux: list.h
Log Message:
provide list_is_first
Author: Maya Rashish <[email protected]>
To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/external/bsd/common/include/linux/list.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/external/bsd/common/include/linux/list.h
diff -u src/sys/external/bsd/common/include/linux/list.h:1.22 src/sys/external/bsd/common/include/linux/list.h:1.23
--- src/sys/external/bsd/common/include/linux/list.h:1.22 Sun Dec 19 01:46:23 2021
+++ src/sys/external/bsd/common/include/linux/list.h Sun Dec 19 01:57:57 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: list.h,v 1.22 2021/12/19 01:46:23 riastradh Exp $ */
+/* $NetBSD: list.h,v 1.23 2021/12/19 01:57:57 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -108,6 +108,13 @@ list_is_singular(const struct list_head
}
static inline bool
+list_is_first(const struct list_head *entry, const struct list_head *head)
+{
+ return head == entry->prev;
+
+}
+
+static inline bool
list_is_last(const struct list_head *entry, const struct list_head *head)
{
return head == entry->next;