diff options
| author | Robert Watson <rwatson@FreeBSD.org> | 2001-06-30 03:13:36 +0000 |
|---|---|---|
| committer | Robert Watson <rwatson@FreeBSD.org> | 2001-06-30 03:13:36 +0000 |
| commit | 1af55356f8d2d34527644100818e547417fa0017 (patch) | |
| tree | 4bb7fd7c5324ac143ebcc06e4985a10c4704d135 /sys/posix4 | |
| parent | a300519d4178de18f8deaf490e88e28163063138 (diff) | |
Notes
Diffstat (limited to 'sys/posix4')
| -rw-r--r-- | sys/posix4/p1003_1b.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/sys/posix4/p1003_1b.c b/sys/posix4/p1003_1b.c index b0d8bc5b15db4..4f7d339427201 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); } |
