32c32
< * $FreeBSD: head/lib/libthr/thread/thr_getschedparam.c 160287 2006-07-12 06:13:18Z davidxu $
---
> * $FreeBSD: head/lib/libthr/thread/thr_getschedparam.c 160321 2006-07-13 06:35:43Z davidxu $
60,67c60,62
<
< /*
< * XXX Here we need two separated syscalls, atomic is only
< * guaranteed in thread library, a new syscall is needed.
< */
<
< *policy = sched_getscheduler((pid_t)curthread->tid);
< if (*policy == -1)
---
> ret = thr_getscheduler((pid_t)curthread->tid, policy, param,
> sizeof(param));
> if (ret == -1)
69,73d63
< else {
< ret = sched_getparam((pid_t)curthread->tid, param);
< if (ret == -1)
< ret = errno;
< }
80,81c70,72
< *policy = sched_getscheduler((pid_t)pthread->tid);
< if (*policy == -1)
---
> ret = thr_getscheduler(pthread->tid, policy, param,
> sizeof(param));
> if (ret == -1)
83,87d73
< else {
< ret = sched_getparam((pid_t)pthread->tid, param);
< if (ret == -1)
< ret = errno;
< }
< * $FreeBSD: head/lib/libthr/thread/thr_getschedparam.c 160287 2006-07-12 06:13:18Z davidxu $
---
> * $FreeBSD: head/lib/libthr/thread/thr_getschedparam.c 160321 2006-07-13 06:35:43Z davidxu $
60,67c60,62
<
< /*
< * XXX Here we need two separated syscalls, atomic is only
< * guaranteed in thread library, a new syscall is needed.
< */
<
< *policy = sched_getscheduler((pid_t)curthread->tid);
< if (*policy == -1)
---
> ret = thr_getscheduler((pid_t)curthread->tid, policy, param,
> sizeof(param));
> if (ret == -1)
69,73d63
< else {
< ret = sched_getparam((pid_t)curthread->tid, param);
< if (ret == -1)
< ret = errno;
< }
80,81c70,72
< *policy = sched_getscheduler((pid_t)pthread->tid);
< if (*policy == -1)
---
> ret = thr_getscheduler(pthread->tid, policy, param,
> sizeof(param));
> if (ret == -1)
83,87d73
< else {
< ret = sched_getparam((pid_t)pthread->tid, param);
< if (ret == -1)
< ret = errno;
< }