Lines Matching defs:pthread
38 #include <pthread.h>
45 _pthread_setschedparam(pthread_t pthread, int policy,
48 struct pthread *curthread = _get_curthread();
63 } else if ((ret = _thr_ref_add(curthread, pthread, /*include dead*/0))
69 THR_SCHED_LOCK(curthread, pthread);
70 if ((pthread->state == PS_DEAD) ||
71 (pthread->state == PS_DEADLOCK) ||
72 ((pthread->flags & THR_FLAGS_EXITING) != 0)) {
73 THR_SCHED_UNLOCK(curthread, pthread);
74 _thr_ref_delete(curthread, pthread);
77 in_syncq = pthread->sflags & THR_FLAGS_IN_SYNCQ;
80 pthread->attr.sched_policy = policy;
83 THR_BASE_PRIORITY(pthread->base_priority))
88 THR_SCHED_UNLOCK(curthread, pthread);
95 old_prio = pthread->active_priority;
96 if ((pthread->flags & THR_FLAGS_IN_RUNQ) != 0) {
98 THR_RUNQ_REMOVE(pthread);
102 pthread->base_priority &=
104 pthread->base_priority = param->sched_priority;
107 pthread->active_priority = MAX(pthread->base_priority,
108 pthread->inherited_priority);
111 if ((pthread->priority_mutex_count > 0) &&
112 (old_prio > pthread->active_priority)) {
120 THR_RUNQ_INSERT_HEAD(pthread);
123 THR_RUNQ_INSERT_TAIL(pthread);
127 THR_SCHED_UNLOCK(curthread, pthread);
134 _mutex_notify_priochange(curthread, pthread, in_syncq);
136 _thr_ref_delete(curthread, pthread);