From c35de5d85da7f89dd1044ece0fcd061be4bde9b6 Mon Sep 17 00:00:00 2001 From: rwatson Date: Sat, 30 Jun 2001 03:13:36 +0000 Subject: Replace some use of 'p' with 'targetp' so as to not scarily overload the passed 'p' argument. No functional change. Obtained from: USENIX Emporium, Cheap Tricks Department --- sys/posix4/p1003_1b.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) (limited to 'sys/posix4') diff --git a/sys/posix4/p1003_1b.c b/sys/posix4/p1003_1b.c index b0d8bc5..4f7d339 100644 --- a/sys/posix4/p1003_1b.c +++ b/sys/posix4/p1003_1b.c @@ -166,6 +166,7 @@ static int sched_attach(void) int sched_setparam(struct proc *p, struct sched_setparam_args *uap) { + struct proc *targetp; int e; struct sched_param sched_param; @@ -173,10 +174,10 @@ int sched_setparam(struct proc *p, if (e) return (e); - e = p31b_proc(p, uap->pid, &p); + e = p31b_proc(p, uap->pid, &targetp); if (e) return (e); - e = ksched_setparam(&p->p_retval[0], ksched, p, + e = ksched_setparam(&p->p_retval[0], ksched, targetp, (const struct sched_param *)&sched_param); return (e); } @@ -186,11 +187,12 @@ int sched_getparam(struct proc *p, { int e; struct sched_param sched_param; + struct proc *targetp; - e = p31b_proc(p, uap->pid, &p); + e = p31b_proc(p, uap->pid, &targetp); if (e) return (e); - e = ksched_getparam(&p->p_retval[0], ksched, p, &sched_param); + e = ksched_getparam(&p->p_retval[0], ksched, targetp, &sched_param); if (e) return (e); @@ -201,16 +203,17 @@ int sched_setscheduler(struct proc *p, struct sched_setscheduler_args *uap) { int e; - struct sched_param sched_param; + struct proc *targetp; + e = copyin(uap->param, &sched_param, sizeof(sched_param)); if (e) return (e); - e = p31b_proc(p, uap->pid, &p); + e = p31b_proc(p, uap->pid, &targetp); if (e) return (e); - e = ksched_setscheduler(&p->p_retval[0], ksched, p, uap->policy, + e = ksched_setscheduler(&p->p_retval[0], ksched, targetp, uap->policy, (const struct sched_param *)&sched_param); return (e); @@ -219,11 +222,12 @@ int sched_getscheduler(struct proc *p, struct sched_getscheduler_args *uap) { int e; + struct proc *targetp; - e = p31b_proc(p, uap->pid, &p); + e = p31b_proc(p, uap->pid, &targetp); if (e) return (e); - e = ksched_getscheduler(&p->p_retval[0], ksched, p); + e = ksched_getscheduler(&p->p_retval[0], ksched, targetp); return (e); } @@ -248,11 +252,13 @@ int sched_rr_get_interval(struct proc *p, struct sched_rr_get_interval_args *uap) { int e; + struct proc *targetp; - e = p31b_proc(p, uap->pid, &p); + e = p31b_proc(p, uap->pid, &targetp); if (e) return (e); - e = ksched_rr_get_interval(&p->p_retval[0], ksched, p, uap->interval); + e = ksched_rr_get_interval(&p->p_retval[0], ksched, targetp, + uap->interval); return (e); } -- cgit v1.1