diff options
author | Vitaliy Makkoveev <mvs@cvs.openbsd.org> | 2022-12-07 20:08:30 +0000 |
---|---|---|
committer | Vitaliy Makkoveev <mvs@cvs.openbsd.org> | 2022-12-07 20:08:30 +0000 |
commit | 169f7d39076e5dfe01d01968afd2c5e824a7e738 (patch) | |
tree | 6de06d21aad91531318dcf91eecc21693b7d9fd0 /sys/kern | |
parent | 336e8a5c45e8007d4b8d777ca6964d5ebdd2fe3f (diff) |
Document 'uidinfo' structure locks.
Inputs and ok bluhm@
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_proc.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 932b53b73ac..e68ffad4126 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_proc.c,v 1.92 2022/08/14 01:58:27 jsg Exp $ */ +/* $OpenBSD: kern_proc.c,v 1.93 2022/12/07 20:08:28 mvs Exp $ */ /* $NetBSD: kern_proc.c,v 1.14 1996/02/09 18:59:41 christos Exp $ */ /* @@ -43,10 +43,16 @@ #include <sys/pool.h> #include <sys/vnode.h> +/* + * Locks used to protect struct members in this file: + * I immutable after creation + * U uidinfolk + */ + struct rwlock uidinfolk; #define UIHASH(uid) (&uihashtbl[(uid) & uihash]) -LIST_HEAD(uihashhead, uidinfo) *uihashtbl; -u_long uihash; /* size of hash table - 1 */ +LIST_HEAD(uihashhead, uidinfo) *uihashtbl; /* [U] */ +u_long uihash; /* [I] size of hash table - 1 */ /* * Other process lists |