summaryrefslogtreecommitdiffstats
path: root/lib/libthr/thread/thr_getschedparam.c
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2006-04-27 08:18:23 +0000
committerdavidxu <davidxu@FreeBSD.org>2006-04-27 08:18:23 +0000
commit66d0fee031ed44d54ee9e1a183fbe75c37a6e158 (patch)
treedaa71c55e66d8720e95d00de6f5673a23b90bfa8 /lib/libthr/thread/thr_getschedparam.c
parente4cefd49df59b5e0ac6b8c1791cf554240bae189 (diff)
downloadFreeBSD-src-66d0fee031ed44d54ee9e1a183fbe75c37a6e158.zip
FreeBSD-src-66d0fee031ed44d54ee9e1a183fbe75c37a6e158.tar.gz
- Use same priority range returned by kernel's sched_get_priority_min()
and sched_get_priority_max() syscalls. - Remove unused fields from structure pthread_attr.
Diffstat (limited to 'lib/libthr/thread/thr_getschedparam.c')
-rw-r--r--lib/libthr/thread/thr_getschedparam.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/libthr/thread/thr_getschedparam.c b/lib/libthr/thread/thr_getschedparam.c
index 88d8524..31b3268 100644
--- a/lib/libthr/thread/thr_getschedparam.c
+++ b/lib/libthr/thread/thr_getschedparam.c
@@ -57,8 +57,7 @@ _pthread_getschedparam(pthread_t pthread, int *policy,
* thread.
*/
THR_THREAD_LOCK(curthread, curthread);
- param->sched_priority =
- THR_BASE_PRIORITY(pthread->base_priority);
+ param->sched_priority = pthread->base_priority;
tmp = pthread->attr.sched_policy;
THR_THREAD_UNLOCK(curthread, curthread);
*policy = tmp;
@@ -68,8 +67,7 @@ _pthread_getschedparam(pthread_t pthread, int *policy,
else if ((ret = _thr_ref_add(curthread, pthread, /*include dead*/0))
== 0) {
THR_THREAD_LOCK(curthread, pthread);
- param->sched_priority =
- THR_BASE_PRIORITY(pthread->base_priority);
+ param->sched_priority = pthread->base_priority;
tmp = pthread->attr.sched_policy;
THR_THREAD_UNLOCK(curthread, pthread);
_thr_ref_delete(curthread, pthread);
OpenPOWER on IntegriCloud