From ccb89ed8b9afe48ba0f91404353f68628d5fb485 Mon Sep 17 00:00:00 2001 From: Martin Pieuchot Date: Fri, 1 Nov 2019 19:13:53 +0000 Subject: Document that p_{sp,pc}inentry are owned by the current thread. --- sys/sys/proc.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sys') 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. */ -- cgit v1.2.3