Module Name: src
Committed By: riastradh
Date: Fri Nov 18 06:41:52 UTC 2016
Modified Files:
src/sys/sys: pslist.h
Log Message:
Explain why we don't touch the next pointer of the removed entry.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/sys/pslist.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/sys/pslist.h
diff -u src/sys/sys/pslist.h:1.3 src/sys/sys/pslist.h:1.4
--- src/sys/sys/pslist.h:1.3 Thu Jul 7 06:56:25 2016
+++ src/sys/sys/pslist.h Fri Nov 18 06:41:52 2016
@@ -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 @@ pslist_writer_remove(struct pslist_entry
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 *