Source-Changes-HG archive

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

[src/trunk]: src/sys/sys Explain why we don't touch the next pointer of the r...



details:   https://anonhg.NetBSD.org/src/rev/65a426894d77
branches:  trunk
changeset: 348961:65a426894d77
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Fri Nov 18 06:41:52 2016 +0000

description:
Explain why we don't touch the next pointer of the removed entry.

diffstat:

 sys/sys/pslist.h |  9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diffs (23 lines):

diff -r 557aa3440c91 -r 65a426894d77 sys/sys/pslist.h
--- a/sys/sys/pslist.h  Fri Nov 18 02:37:33 2016 +0000
+++ b/sys/sys/pslist.h  Fri Nov 18 06:41:52 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pslist.h,v 1.3 2016/07/07 06:56:25 ozaki-r Exp $       */
+/*     $NetBSD: pslist.h,v 1.4 2016/11/18 06:41:52 riastradh Exp $     */
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -175,6 +175,13 @@
                entry->ple_next->ple_prevp = entry->ple_prevp;
        *entry->ple_prevp = entry->ple_next;
        entry->ple_prevp = NULL;
+
+       /*
+        * Leave entry->ple_next intact so that any extant readers can
+        * continue iterating through the list.  The caller must then
+        * wait for readers to drain, e.g. with pserialize_perform,
+        * before destroying and reusing the entry.
+        */
 }
 
 static inline struct pslist_entry *



Home | Main Index | Thread Index | Old Index