Lines Matching refs:policy
49 _thr_setparam(pthread_t tid, int policy, int prio)
58 if (policy == ulwp->ul_policy &&
59 (policy == SCHED_FIFO || policy == SCHED_RR) &&
69 } else if ((cid = setparam(P_LWPID, tid, policy, prio)) == -1) {
72 if (policy == SCHED_FIFO || policy == SCHED_RR)
77 ulwp->ul_policy = policy;
107 (ap->policy == SCHED_SYS ||
108 (pccp = get_info_by_policy(ap->policy)) == NULL ||
117 (ap->policy != self->ul_policy ||
122 * policy and parameters on the new thread.
124 error = _thr_setparam(tid, ap->policy, ap->prio);
195 pthread_getschedparam(pthread_t tid, int *policy, struct sched_param *param)
204 cid = getparam(P_LWPID, ulwp->ul_lwpid, policy, param);
207 } else if (*policy == ulwp->ul_policy && cid == ulwp->ul_cid &&
208 (*policy == SCHED_FIFO || *policy == SCHED_RR)) {
215 if (*policy == SCHED_FIFO || *policy == SCHED_RR)
220 ulwp->ul_policy = *policy;
233 int policy;
236 if ((error = pthread_getschedparam(tid, &policy, ¶m)) == 0)
246 int policy, const struct sched_param *param)
248 return (_thr_setparam(tid, policy, param->sched_priority));
256 int policy;
263 if ((error = pthread_getschedparam(tid, &policy, ¶m)) != 0)
267 return (_thr_setparam(tid, policy, prio));