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 Add list_replace_init.



details:   https://anonhg.NetBSD.org/src/rev/706974cda345
branches:  trunk
changeset: 364415:706974cda345
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 07:21:59 2018 +0000

description:
Add list_replace_init.

diffstat:

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

diffs (23 lines):

diff -r 3234c133e61c -r 706974cda345 sys/external/bsd/common/include/linux/list.h
--- a/sys/external/bsd/common/include/linux/list.h      Mon Aug 27 07:21:48 2018 +0000
+++ b/sys/external/bsd/common/include/linux/list.h      Mon Aug 27 07:21:59 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: list.h,v 1.13 2018/08/27 07:03:50 riastradh Exp $      */
+/*     $NetBSD: list.h,v 1.14 2018/08/27 07:21:59 riastradh Exp $      */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -190,6 +190,13 @@
 }
 
 static inline void
+list_replace_init(struct list_head *old, struct list_head *new)
+{
+       list_replace(old, new);
+       INIT_LIST_HEAD(old);
+}
+
+static inline void
 list_del_init(struct list_head *node)
 {
        list_del(node);



Home | Main Index | Thread Index | Old Index