summaryrefslogtreecommitdiff
path: root/lib/libthr/thread/thr_setschedparam.c
diff options
context:
space:
mode:
authorDavid Xu <davidxu@FreeBSD.org>2006-07-13 06:35:43 +0000
committerDavid Xu <davidxu@FreeBSD.org>2006-07-13 06:35:43 +0000
commit561a89f9457194c9d92d6783eb091b1a9736dae3 (patch)
treea578a4c69968927b0ae5c15efa30827ff9d1c6ef /lib/libthr/thread/thr_setschedparam.c
parentba493ceb6bf95551b85cada1be47b5121b6bf0bc (diff)
Notes
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 e04452f5dfdf..5e2d2bfcbfe9 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 {