diff options
author | bde <bde@FreeBSD.org> | 1999-12-27 10:22:09 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1999-12-27 10:22:09 +0000 |
commit | dc68d5537abe5fbecd1144ef0ff8ba033aeede78 (patch) | |
tree | fbc392c3fb9453686595e0591a2f9aa81d42f4d0 /sys | |
parent | fe7ce73a659d046d50a2023c8cca3ab12810bd7d (diff) | |
download | FreeBSD-src-dc68d5537abe5fbecd1144ef0ff8ba033aeede78.zip FreeBSD-src-dc68d5537abe5fbecd1144ef0ff8ba033aeede78.tar.gz |
Fixed some type mismatches. p_retval[0] in struct proc has type
register_t, so pointers to it must be passed around as `register_t *',
not as `int *'. The type mismatches were non-benign on alphas, but
the broken code is normally only configured by LINT.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/ksched.c | 22 | ||||
-rw-r--r-- | sys/posix4/ksched.c | 22 | ||||
-rw-r--r-- | sys/posix4/posix4.h | 18 | ||||
-rw-r--r-- | sys/sys/posix4.h | 18 |
4 files changed, 44 insertions, 36 deletions
diff --git a/sys/kern/ksched.c b/sys/kern/ksched.c index 3718e253..8f297b2 100644 --- a/sys/kern/ksched.c +++ b/sys/kern/ksched.c @@ -29,6 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * $FreeBSD$ */ /* ksched: Soft real time scheduling based on "rtprio". @@ -93,7 +94,7 @@ int ksched_detach(struct ksched *p) #define P1B_PRIO_MAX rtpprio_to_p4prio(RTP_PRIO_MIN) static __inline int -getscheduler(int *ret, struct ksched *ksched, struct proc *p) +getscheduler(register_t *ret, struct ksched *ksched, struct proc *p) { int e = 0; @@ -115,10 +116,11 @@ getscheduler(int *ret, struct ksched *ksched, struct proc *p) return e; } -int ksched_setparam(int *ret, struct ksched *ksched, +int ksched_setparam(register_t *ret, struct ksched *ksched, struct proc *p, const struct sched_param *param) { - int e, policy; + register_t policy; + int e; e = getscheduler(&policy, ksched, p); @@ -133,7 +135,7 @@ int ksched_setparam(int *ret, struct ksched *ksched, return e; } -int ksched_getparam(int *ret, struct ksched *ksched, +int ksched_getparam(register_t *ret, struct ksched *ksched, struct proc *p, struct sched_param *param) { if (RTP_PRIO_IS_REALTIME(p->p_rtprio.type)) @@ -149,7 +151,7 @@ int ksched_getparam(int *ret, struct ksched *ksched, * The permissions to modify process p were checked in "p31b_proc()". * */ -int ksched_setscheduler(int *ret, struct ksched *ksched, +int ksched_setscheduler(register_t *ret, struct ksched *ksched, struct proc *p, int policy, const struct sched_param *param) { int e = 0; @@ -196,20 +198,20 @@ int ksched_setscheduler(int *ret, struct ksched *ksched, return e; } -int ksched_getscheduler(int *ret, struct ksched *ksched, struct proc *p) +int ksched_getscheduler(register_t *ret, struct ksched *ksched, struct proc *p) { return getscheduler(ret, ksched, p); } /* ksched_yield: Yield the CPU. */ -int ksched_yield(int *ret, struct ksched *ksched) +int ksched_yield(register_t *ret, struct ksched *ksched) { need_resched(); return 0; } -int ksched_get_priority_max(int *ret, struct ksched *ksched, int policy) +int ksched_get_priority_max(register_t*ret, struct ksched *ksched, int policy) { int e = 0; @@ -231,7 +233,7 @@ int ksched_get_priority_max(int *ret, struct ksched *ksched, int policy) return e; } -int ksched_get_priority_min(int *ret, struct ksched *ksched, int policy) +int ksched_get_priority_min(register_t *ret, struct ksched *ksched, int policy) { int e = 0; @@ -253,7 +255,7 @@ int ksched_get_priority_min(int *ret, struct ksched *ksched, int policy) return e; } -int ksched_rr_get_interval(int *ret, struct ksched *ksched, +int ksched_rr_get_interval(register_t *ret, struct ksched *ksched, struct proc *p, struct timespec *timespec) { *timespec = ksched->rr_interval; diff --git a/sys/posix4/ksched.c b/sys/posix4/ksched.c index 3718e253..8f297b2 100644 --- a/sys/posix4/ksched.c +++ b/sys/posix4/ksched.c @@ -29,6 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * $FreeBSD$ */ /* ksched: Soft real time scheduling based on "rtprio". @@ -93,7 +94,7 @@ int ksched_detach(struct ksched *p) #define P1B_PRIO_MAX rtpprio_to_p4prio(RTP_PRIO_MIN) static __inline int -getscheduler(int *ret, struct ksched *ksched, struct proc *p) +getscheduler(register_t *ret, struct ksched *ksched, struct proc *p) { int e = 0; @@ -115,10 +116,11 @@ getscheduler(int *ret, struct ksched *ksched, struct proc *p) return e; } -int ksched_setparam(int *ret, struct ksched *ksched, +int ksched_setparam(register_t *ret, struct ksched *ksched, struct proc *p, const struct sched_param *param) { - int e, policy; + register_t policy; + int e; e = getscheduler(&policy, ksched, p); @@ -133,7 +135,7 @@ int ksched_setparam(int *ret, struct ksched *ksched, return e; } -int ksched_getparam(int *ret, struct ksched *ksched, +int ksched_getparam(register_t *ret, struct ksched *ksched, struct proc *p, struct sched_param *param) { if (RTP_PRIO_IS_REALTIME(p->p_rtprio.type)) @@ -149,7 +151,7 @@ int ksched_getparam(int *ret, struct ksched *ksched, * The permissions to modify process p were checked in "p31b_proc()". * */ -int ksched_setscheduler(int *ret, struct ksched *ksched, +int ksched_setscheduler(register_t *ret, struct ksched *ksched, struct proc *p, int policy, const struct sched_param *param) { int e = 0; @@ -196,20 +198,20 @@ int ksched_setscheduler(int *ret, struct ksched *ksched, return e; } -int ksched_getscheduler(int *ret, struct ksched *ksched, struct proc *p) +int ksched_getscheduler(register_t *ret, struct ksched *ksched, struct proc *p) { return getscheduler(ret, ksched, p); } /* ksched_yield: Yield the CPU. */ -int ksched_yield(int *ret, struct ksched *ksched) +int ksched_yield(register_t *ret, struct ksched *ksched) { need_resched(); return 0; } -int ksched_get_priority_max(int *ret, struct ksched *ksched, int policy) +int ksched_get_priority_max(register_t*ret, struct ksched *ksched, int policy) { int e = 0; @@ -231,7 +233,7 @@ int ksched_get_priority_max(int *ret, struct ksched *ksched, int policy) return e; } -int ksched_get_priority_min(int *ret, struct ksched *ksched, int policy) +int ksched_get_priority_min(register_t *ret, struct ksched *ksched, int policy) { int e = 0; @@ -253,7 +255,7 @@ int ksched_get_priority_min(int *ret, struct ksched *ksched, int policy) return e; } -int ksched_rr_get_interval(int *ret, struct ksched *ksched, +int ksched_rr_get_interval(register_t *ret, struct ksched *ksched, struct proc *p, struct timespec *timespec) { *timespec = ksched->rr_interval; diff --git a/sys/posix4/posix4.h b/sys/posix4/posix4.h index dee09ec..232435a 100644 --- a/sys/posix4/posix4.h +++ b/sys/posix4/posix4.h @@ -31,6 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * $FreeBSD$ */ #include "opt_posix.h" @@ -93,21 +94,22 @@ struct ksched; int ksched_attach(struct ksched **); int ksched_detach(struct ksched *); -int ksched_setparam(int *, struct ksched *, +int ksched_setparam(register_t *, struct ksched *, struct proc *, const struct sched_param *); -int ksched_getparam(int *, struct ksched *, +int ksched_getparam(register_t *, struct ksched *, struct proc *, struct sched_param *); -int ksched_setscheduler(int *, struct ksched *, +int ksched_setscheduler(register_t *, struct ksched *, struct proc *, int, const struct sched_param *); -int ksched_getscheduler(int *, struct ksched *, struct proc *); +int ksched_getscheduler(register_t *, struct ksched *, struct proc *); -int ksched_yield(int *, struct ksched *); +int ksched_yield(register_t *, struct ksched *); -int ksched_get_priority_max(int *, struct ksched *, int); -int ksched_get_priority_min(int *, struct ksched *, int); +int ksched_get_priority_max(register_t *, struct ksched *, int); +int ksched_get_priority_min(register_t *, struct ksched *, int); -int ksched_rr_get_interval(int *, struct ksched *, struct proc *, struct timespec *); +int ksched_rr_get_interval(register_t *, struct ksched *, + struct proc *, struct timespec *); #endif /* _KPOSIX_PRIORITY_SCHEDULING */ diff --git a/sys/sys/posix4.h b/sys/sys/posix4.h index dee09ec..232435a 100644 --- a/sys/sys/posix4.h +++ b/sys/sys/posix4.h @@ -31,6 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * $FreeBSD$ */ #include "opt_posix.h" @@ -93,21 +94,22 @@ struct ksched; int ksched_attach(struct ksched **); int ksched_detach(struct ksched *); -int ksched_setparam(int *, struct ksched *, +int ksched_setparam(register_t *, struct ksched *, struct proc *, const struct sched_param *); -int ksched_getparam(int *, struct ksched *, +int ksched_getparam(register_t *, struct ksched *, struct proc *, struct sched_param *); -int ksched_setscheduler(int *, struct ksched *, +int ksched_setscheduler(register_t *, struct ksched *, struct proc *, int, const struct sched_param *); -int ksched_getscheduler(int *, struct ksched *, struct proc *); +int ksched_getscheduler(register_t *, struct ksched *, struct proc *); -int ksched_yield(int *, struct ksched *); +int ksched_yield(register_t *, struct ksched *); -int ksched_get_priority_max(int *, struct ksched *, int); -int ksched_get_priority_min(int *, struct ksched *, int); +int ksched_get_priority_max(register_t *, struct ksched *, int); +int ksched_get_priority_min(register_t *, struct ksched *, int); -int ksched_rr_get_interval(int *, struct ksched *, struct proc *, struct timespec *); +int ksched_rr_get_interval(register_t *, struct ksched *, + struct proc *, struct timespec *); #endif /* _KPOSIX_PRIORITY_SCHEDULING */ |