summaryrefslogtreecommitdiffstats
path: root/lib/libthr/thread/thr_setschedparam.c
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2006-07-13 06:35:43 +0000
committerdavidxu <davidxu@FreeBSD.org>2006-07-13 06:35:43 +0000
commit19b84189035f11be93ba57379660d66d24d77c2b (patch)
treea578a4c69968927b0ae5c15efa30827ff9d1c6ef /lib/libthr/thread/thr_setschedparam.c
parentbde285ca74095822da08a85bc8bc403964bd1036 (diff)
downloadFreeBSD-src-19b84189035f11be93ba57379660d66d24d77c2b.zip
FreeBSD-src-19b84189035f11be93ba57379660d66d24d77c2b.tar.gz
Use thr_setscheduler, thr_getscheduler and thr_setschedparam to implement
pthread functions.
Diffstat (limited to 'lib/libthr/thread/thr_setschedparam.c')
-rw-r--r--lib/libthr/thread/thr_setschedparam.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libthr/thread/thr_setschedparam.c b/lib/libthr/thread/thr_setschedparam.c
index e04452f..5e2d2bf 100644
--- a/lib/libthr/thread/thr_setschedparam.c
+++ b/lib/libthr/thread/thr_setschedparam.c
@@ -55,7 +55,8 @@ _pthread_setschedparam(pthread_t pthread, int policy,
if (pthread == curthread) {
THR_LOCK(curthread);
- ret = sched_setscheduler((pid_t)curthread->tid, policy, param);
+ ret = thr_setscheduler(curthread->tid, policy, param,
+ sizeof(param));
if (ret == -1)
ret = errno;
else {
@@ -66,7 +67,8 @@ _pthread_setschedparam(pthread_t pthread, int policy,
} else if ((ret = _thr_ref_add(curthread, pthread, /*include dead*/0))
== 0) {
THR_THREAD_LOCK(curthread, pthread);
- ret = sched_setscheduler((pid_t)pthread->tid, policy, param);
+ ret = thr_setscheduler(pthread->tid, policy, param,
+ sizeof(param));
if (ret == -1)
ret = errno;
else {
OpenPOWER on IntegriCloud