1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

We don't need Giant to read the pgrp ID since the proc lock has protected

p_pgrp since the pgrp locking went in.  We also don't need it to check for
invalid values in the options argument to wait1(), so push Giant down
slightly.
This commit is contained in:
John Baldwin 2002-04-09 20:00:40 +00:00
parent 16e7bc7b90
commit 6dc958b9ff
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=94302

View File

@ -506,17 +506,15 @@ wait1(td, uap, compat)
struct pargs *pa;
int status, error;
mtx_lock(&Giant);
q = td->td_proc;
if (uap->pid == 0) {
PROC_LOCK(q);
uap->pid = -q->p_pgid;
PROC_UNLOCK(q);
}
if (uap->options &~ (WUNTRACED|WNOHANG|WLINUXCLONE)) {
error = EINVAL;
goto done2;
}
if (uap->options &~ (WUNTRACED|WNOHANG|WLINUXCLONE))
return (EINVAL);
mtx_lock(&Giant);
loop:
nfound = 0;
sx_slock(&proctree_lock);