summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2004-09-24 20:26:15 +0000
committerjhb <jhb@FreeBSD.org>2004-09-24 20:26:15 +0000
commitdcd41a1a0d0a2260eb97bd235710edee21756733 (patch)
tree7d6f3b1d96344d739f078f99f19496e67e964806
parent6b1a765834c784612522308a8743c6164faa1d82 (diff)
downloadFreeBSD-src-dcd41a1a0d0a2260eb97bd235710edee21756733.zip
FreeBSD-src-dcd41a1a0d0a2260eb97bd235710edee21756733.tar.gz
Add a proc *p pointer for td->td_proc to make this code easier to read.
-rw-r--r--sys/compat/svr4/svr4_misc.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/compat/svr4/svr4_misc.c b/sys/compat/svr4/svr4_misc.c
index 6475bad..c0109d7 100644
--- a/sys/compat/svr4/svr4_misc.c
+++ b/sys/compat/svr4/svr4_misc.c
@@ -1208,17 +1208,17 @@ svr4_sys_waitsys(td, uap)
{
int nfound;
int error, *retval = td->td_retval;
- struct proc *q, *t;
-
+ struct proc *p, *q, *t;
+ p = td->td_proc;
switch (uap->grp) {
case SVR4_P_PID:
break;
case SVR4_P_PGID:
- PROC_LOCK(td->td_proc);
- uap->id = -td->td_proc->p_pgid;
- PROC_UNLOCK(td->td_proc);
+ PROC_LOCK(p);
+ uap->id = -p->p_pgid;
+ PROC_UNLOCK(p);
break;
case SVR4_P_ALL:
@@ -1236,7 +1236,7 @@ svr4_sys_waitsys(td, uap)
loop:
nfound = 0;
sx_slock(&proctree_lock);
- LIST_FOREACH(q, &td->td_proc->p_children, p_sibling) {
+ LIST_FOREACH(q, &p->p_children, p_sibling) {
PROC_LOCK(q);
if (uap->id != WAIT_ANY &&
q->p_pid != uap->id &&
@@ -1296,7 +1296,7 @@ loop:
PROC_UNLOCK(q);
sx_xunlock(&proctree_lock);
q->p_xstat = 0;
- ruadd(&td->td_proc->p_stats->p_cru, q->p_ru);
+ ruadd(&p->p_stats->p_cru, q->p_ru);
FREE(q->p_ru, M_ZOMBIE);
q->p_ru = NULL;
@@ -1386,7 +1386,7 @@ loop:
return 0;
}
- if ((error = tsleep(td->td_proc, PWAIT | PCATCH, "svr4_wait", 0)) != 0)
+ if ((error = tsleep(p, PWAIT | PCATCH, "svr4_wait", 0)) != 0)
return error;
goto loop;
}
OpenPOWER on IntegriCloud