Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/sys Fix locking comments.
details: https://anonhg.NetBSD.org/src/rev/a941cc631fa8
branches: trunk
changeset: 352164:a941cc631fa8
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Mar 19 10:21:02 2017 +0000
description:
Fix locking comments.
Forgot to save my Emacs buffer before last commit.
diffstat:
sys/sys/namei.src | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (28 lines):
diff -r 6a250adee295 -r a941cc631fa8 sys/sys/namei.src
--- a/sys/sys/namei.src Sat Mar 18 22:36:56 2017 +0000
+++ b/sys/sys/namei.src Sun Mar 19 10:21:02 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: namei.src,v 1.39 2017/03/18 21:03:28 riastradh Exp $ */
+/* $NetBSD: namei.src,v 1.40 2017/03/19 10:21:02 riastradh Exp $ */
/*
* Copyright (c) 1985, 1989, 1991, 1993
@@ -207,13 +207,15 @@
* - stable after initialization
* L namecache_lock
* C struct nchcpu::cpu_lock
+ * L/C insert/delete needs L and C, read needs L or any C,
+ * must hold L and all C after (or during) delete before free
* N struct namecache::nc_lock
*/
struct namecache {
- LIST_ENTRY(namecache) nc_hash; /* L hash chain */
+ LIST_ENTRY(namecache) nc_hash; /* L/C hash chain */
LIST_ENTRY(namecache) nc_vhash; /* L directory hash chain */
- struct vnode *nc_dvp; /* - vnode of parent of name */
- struct vnode *nc_vp; /* - vnode the name refers to */
+ struct vnode *nc_dvp; /* N vnode of parent of name */
+ struct vnode *nc_vp; /* N vnode the name refers to */
int nc_flags; /* - copy of componentname ISWHITEOUT */
char nc_nlen; /* - length of name */
char nc_name[NCHNAMLEN]; /* - segment name */
Home |
Main Index |
Thread Index |
Old Index