proc.h: fix comment for proc's cached credentials

2020-04-24 Thread Vitaliy Makkoveev
Per thread cached credentials are accessed only by curproc. Curproc
doesn't modify it's 'p_ucred' directly. It allocates new copy, then
modyfies newcopy and replaces the old. So 'p_ucred' is owned by curproc.

Index: sys/sys/proc.h
===
RCS file: /cvs/src/sys/sys/proc.h,v
retrieving revision 1.294
diff -u -p -r1.294 proc.h
--- sys/sys/proc.h  6 Apr 2020 07:52:12 -   1.294
+++ sys/sys/proc.h  24 Apr 2020 10:12:56 -
@@ -392,7 +392,7 @@ struct proc {
u_int   p_estcpu;   /* [s] Time averaged val of p_cpticks */
int p_pledge_syscall;   /* Cache of current syscall */
 
-   struct  ucred *p_ucred; /* cached credentials */
+   struct  ucred *p_ucred; /* [o] cached credentials */
struct  sigaltstack p_sigstk;   /* sp & on stack state variable */
 
u_long  p_prof_addr;/* tmp storage for profiling addr until AST */



proc.h: fix comment

2016-03-04 Thread Michal Mazurek
After looking at dowait4() I believe this is a typo.

Change space to a tab while here.


Index: sys/sys/proc.h
===
RCS file: /cvs/src/sys/sys/proc.h,v
retrieving revision 1.213
diff -u -p -r1.213 proc.h
--- sys/sys/proc.h  6 Dec 2015 17:50:21 -   1.213
+++ sys/sys/proc.h  4 Mar 2016 13:57:54 -
@@ -245,7 +245,7 @@ struct process {
 #definePS_ISPWAIT  0x0080  /* Is parent of PPWAIT child. */
 #definePS_PROFIL   0x0100  /* Has started profiling. */
 #definePS_TRACED   0x0200  /* Being ptraced. */
-#definePS_WAITED   0x0400  /* Stopped proc has waited for. 
*/
+#definePS_WAITED   0x0400  /* Stopped proc was waited for. 
*/
 #definePS_COREDUMP 0x0800  /* Busy coredumping */
 #definePS_SINGLEEXIT   0x1000  /* Other threads must die. */
 #definePS_SINGLEUNWIND 0x2000  /* Other threads must unwind. */
@@ -255,7 +255,7 @@ struct process {
 #definePS_EMBRYO   0x0002  /* New process, not yet fledged 
*/
 #definePS_ZOMBIE   0x0004  /* Dead and ready to be waited 
for */
 #definePS_NOBROADCASTKILL 0x0008   /* Process excluded from kill 
-1. */
-#define PS_PLEDGE  0x0010  /* Has called pledge(2) */
+#definePS_PLEDGE   0x0010  /* Has called pledge(2) */
 
 #definePS_BITS \
 ("\20" "\01CONTROLT" "\02EXEC" "\03INEXEC" "\04EXITING" "\05SUGID" \

-- 
Michal Mazurek