summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2019-11-01 19:13:52 +0000
committermpi <mpi@openbsd.org>2019-11-01 19:13:52 +0000
commitc541d61e57300c6ebb57842efbd8b2ceb28c1a0c (patch)
tree1abdb38d7e9f1f01cb1dc60b96c88f17db2e9b8b
parentsync (diff)
downloadwireguard-openbsd-c541d61e57300c6ebb57842efbd8b2ceb28c1a0c.tar.xz
wireguard-openbsd-c541d61e57300c6ebb57842efbd8b2ceb28c1a0c.zip
Document that p_{sp,pc}inentry are owned by the current thread.
-rw-r--r--sys/sys/proc.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/sys/proc.h b/sys/sys/proc.h
index 118cec245ff..e6e3408ec68 100644
--- a/sys/sys/proc.h
+++ b/sys/sys/proc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: proc.h,v 1.275 2019/10/22 21:19:22 cheloha Exp $ */
+/* $OpenBSD: proc.h,v 1.276 2019/11/01 19:13:52 mpi Exp $ */
/* $NetBSD: proc.h,v 1.44 1996/04/22 01:23:21 christos Exp $ */
/*-
@@ -318,6 +318,7 @@ struct p_inentry {
* I immutable after creation
* s scheduler lock
* l read only reference, see lim_read_enter()
+ * o owned (read/modified only) by this thread
*/
struct proc {
TAILQ_ENTRY(proc) p_runq; /* [s] current run/sleep queue */
@@ -332,8 +333,8 @@ struct proc {
/* substructures: */
struct filedesc *p_fd; /* copy of p_p->ps_fd */
struct vmspace *p_vmspace; /* [I] copy of p_p->ps_vmspace */
- struct p_inentry p_spinentry;
- struct p_inentry p_pcinentry;
+ struct p_inentry p_spinentry; /* [o] cache for SP check */
+ struct p_inentry p_pcinentry; /* [o] cache for PC check */
struct plimit *p_limit; /* [l] read ref. of p_p->ps_limit */
int p_flag; /* P_* flags. */