Module Name:    src
Committed By:   riastradh
Date:           Sun Dec 19 01:46:23 UTC 2021

Modified Files:
        src/sys/external/bsd/common/include/linux: list.h

Log Message:
list_is_last


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 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.21 src/sys/external/bsd/common/include/linux/list.h:1.22
--- src/sys/external/bsd/common/include/linux/list.h:1.21	Sun Dec 19 01:44:41 2021
+++ src/sys/external/bsd/common/include/linux/list.h	Sun Dec 19 01:46:23 2021
@@ -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 
 	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)

Reply via email to