summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJake Burkholder <jake@FreeBSD.org>2003-02-10 04:42:20 +0000
committerJake Burkholder <jake@FreeBSD.org>2003-02-10 04:42:20 +0000
commit3749dff3f9323596a9326efa4bf2b560c0e9d1d3 (patch)
tree5c22cac34181dfc5ef9351f51fb429a503980927
parentf8e84641ecd277813fdb780289c2c2030c6c42bd (diff)
Notes
-rw-r--r--sys/kern/kern_prot.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c
index 0d8865a9a5cc..e89f342279c9 100644
--- a/sys/kern/kern_prot.c
+++ b/sys/kern/kern_prot.c
@@ -84,16 +84,13 @@ int
getpid(struct thread *td, struct getpid_args *uap)
{
struct proc *p = td->td_proc;
- int s;
- s = mtx_lock_giant(kern_giant_proc);
td->td_retval[0] = p->p_pid;
#if defined(COMPAT_43) || defined(COMPAT_SUNOS)
PROC_LOCK(p);
td->td_retval[1] = p->p_pptr->p_pid;
PROC_UNLOCK(p);
#endif
- mtx_unlock_giant(s);
return (0);
}
@@ -110,13 +107,10 @@ int
getppid(struct thread *td, struct getppid_args *uap)
{
struct proc *p = td->td_proc;
- int s;
- s = mtx_lock_giant(kern_giant_proc);
PROC_LOCK(p);
td->td_retval[0] = p->p_pptr->p_pid;
PROC_UNLOCK(p);
- mtx_unlock_giant(s);
return (0);
}
@@ -135,13 +129,10 @@ int
getpgrp(struct thread *td, struct getpgrp_args *uap)
{
struct proc *p = td->td_proc;
- int s;
- s = mtx_lock_giant(kern_giant_proc);
PROC_LOCK(p);
td->td_retval[0] = p->p_pgrp->pg_id;
PROC_UNLOCK(p);
- mtx_unlock_giant(s);
return (0);
}