summaryrefslogtreecommitdiffstats
path: root/lib/libthr/thread/thr_setprio.c
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2006-09-21 04:21:30 +0000
committerdavidxu <davidxu@FreeBSD.org>2006-09-21 04:21:30 +0000
commitd2c57b7fad5ce91e8b900f315b41d142831b90f1 (patch)
treef7b8debfd8a0b2054c46d867116922ddcfad5995 /lib/libthr/thread/thr_setprio.c
parent92bd1e76b1d6d685331ec54d7b5703a34d37f84e (diff)
downloadFreeBSD-src-d2c57b7fad5ce91e8b900f315b41d142831b90f1.zip
FreeBSD-src-d2c57b7fad5ce91e8b900f315b41d142831b90f1.tar.gz
use rtprio_thread system call to get or set thread priority.
Diffstat (limited to 'lib/libthr/thread/thr_setprio.c')
-rw-r--r--lib/libthr/thread/thr_setprio.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libthr/thread/thr_setprio.c b/lib/libthr/thread/thr_setprio.c
index cca4771..21bb1a4 100644
--- a/lib/libthr/thread/thr_setprio.c
+++ b/lib/libthr/thread/thr_setprio.c
@@ -55,8 +55,8 @@ _pthread_setprio(pthread_t pthread, int prio)
curthread->attr.prio = prio;
ret = 0;
} else {
- ret = thr_setschedparam(curthread->tid,
- &param, sizeof(struct sched_param));
+ ret = _thr_setscheduler(curthread->tid,
+ curthread->attr.sched_policy, &param);
if (ret == -1)
ret = errno;
else
@@ -71,8 +71,8 @@ _pthread_setprio(pthread_t pthread, int prio)
pthread->attr.prio = prio;
ret = 0;
} else {
- ret = thr_setschedparam(pthread->tid, &param,
- sizeof(struct sched_param));
+ ret = _thr_setscheduler(pthread->tid,
+ curthread->attr.sched_policy, &param);
if (ret == -1)
ret = errno;
else
OpenPOWER on IntegriCloud