summaryrefslogtreecommitdiffstats
path: root/sys/posix4
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>2002-02-11 20:37:54 +0000
committerjulian <julian@FreeBSD.org>2002-02-11 20:37:54 +0000
commit37369620df3d22440dcb4976ad061fe320a01bcb (patch)
tree91fc1230622927515e2c60360059682b64d84592 /sys/posix4
parent72a803ac5ecbbbc7caf38fab112121c93f703b3f (diff)
downloadFreeBSD-src-37369620df3d22440dcb4976ad061fe320a01bcb.zip
FreeBSD-src-37369620df3d22440dcb4976ad061fe320a01bcb.tar.gz
In a threaded world, differnt priorirites become properties of
different entities. Make it so. Reviewed by: jhb@freebsd.org (john baldwin)
Diffstat (limited to 'sys/posix4')
-rw-r--r--sys/posix4/ksched.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/posix4/ksched.c b/sys/posix4/ksched.c
index 6ad2a07..c9081c3 100644
--- a/sys/posix4/ksched.c
+++ b/sys/posix4/ksched.c
@@ -100,7 +100,7 @@ getscheduler(register_t *ret, struct ksched *ksched, struct thread *td)
int e = 0;
mtx_lock_spin(&sched_lock);
- pri_to_rtp(&td->td_ksegrp->kg_pri, &rtp);
+ pri_to_rtp(td->td_ksegrp, &rtp);
mtx_unlock_spin(&sched_lock);
switch (rtp.type)
{
@@ -145,7 +145,7 @@ int ksched_getparam(register_t *ret, struct ksched *ksched,
struct rtprio rtp;
mtx_lock_spin(&sched_lock);
- pri_to_rtp(&td->td_ksegrp->kg_pri, &rtp);
+ pri_to_rtp(td->td_ksegrp, &rtp);
mtx_unlock_spin(&sched_lock);
if (RTP_PRIO_IS_REALTIME(rtp.type))
param->sched_priority = rtpprio_to_p4prio(rtp.prio);
@@ -165,6 +165,7 @@ int ksched_setscheduler(register_t *ret, struct ksched *ksched,
{
int e = 0;
struct rtprio rtp;
+ struct ksegrp *kg = td->td_ksegrp;
switch(policy)
{
@@ -179,7 +180,7 @@ int ksched_setscheduler(register_t *ret, struct ksched *ksched,
? RTP_PRIO_FIFO : RTP_PRIO_REALTIME;
mtx_lock_spin(&sched_lock);
- rtp_to_pri(&rtp, &td->td_ksegrp->kg_pri);
+ rtp_to_pri(&rtp, kg);
td->td_last_kse->ke_flags |= KEF_NEEDRESCHED; /* XXXKSE */
mtx_unlock_spin(&sched_lock);
}
@@ -194,7 +195,7 @@ int ksched_setscheduler(register_t *ret, struct ksched *ksched,
rtp.type = RTP_PRIO_NORMAL;
rtp.prio = p4prio_to_rtpprio(param->sched_priority);
mtx_lock_spin(&sched_lock);
- rtp_to_pri(&rtp, &td->td_ksegrp->kg_pri);
+ rtp_to_pri(&rtp, kg);
/* XXX Simply revert to whatever we had for last
* normal scheduler priorities.
OpenPOWER on IntegriCloud