Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/common/include/linux __list_del_entry, and ...



details:   https://anonhg.NetBSD.org/src/rev/1a68551e9d94
branches:  trunk
changeset: 1028053:1a68551e9d94
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 01:44:41 2021 +0000

description:
__list_del_entry, and poison list_del.

diffstat:

 sys/external/bsd/common/include/linux/list.h |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (32 lines):

diff -r af45540e4764 -r 1a68551e9d94 sys/external/bsd/common/include/linux/list.h
--- a/sys/external/bsd/common/include/linux/list.h      Sun Dec 19 01:44:33 2021 +0000
+++ b/sys/external/bsd/common/include/linux/list.h      Sun Dec 19 01:44:41 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: list.h,v 1.20 2021/12/19 01:19:37 riastradh Exp $      */
+/*     $NetBSD: list.h,v 1.21 2021/12/19 01:44:41 riastradh Exp $      */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -130,13 +130,21 @@
 }
 
 static inline void
-list_del(struct list_head *entry)
+__list_del_entry(struct list_head *entry)
 {
        entry->prev->next = entry->next;
        entry->next->prev = entry->prev;
 }
 
 static inline void
+list_del(struct list_head *entry)
+{
+       __list_del_entry(entry);
+       entry->next = (void *)(uintptr_t)1;
+       entry->prev = (void *)(uintptr_t)2;
+}
+
+static inline void
 __list_splice_between(struct list_head *prev, const struct list_head *list,
     struct list_head *next)
 {



Home | Main Index | Thread Index | Old Index