Lines Matching defs:pthread

36 #include <pthread.h>
47 static inline struct pthread *cond_queue_deq(pthread_cond_t);
51 static inline void check_continuation(struct pthread *,
142 struct pthread *curthread = _get_curthread();
178 struct pthread *curthread = _get_curthread();
361 struct pthread *curthread = _get_curthread();
374 struct pthread *curthread = _get_curthread();
565 struct pthread *curthread = _get_curthread();
578 struct pthread *curthread = _get_curthread();
579 struct pthread *pthread;
608 if ((pthread = TAILQ_FIRST(&(*cond)->c_queue))
610 THR_SCHED_LOCK(curthread, pthread);
611 cond_queue_remove(*cond, pthread);
612 pthread->sigbackout = NULL;
613 if ((pthread->kseg == curthread->kseg) &&
614 (pthread->active_priority >
617 kmbx = _thr_setrunnable_unlocked(pthread);
618 THR_SCHED_UNLOCK(curthread, pthread);
647 struct pthread *curthread = _get_curthread();
648 struct pthread *pthread;
675 while ((pthread = TAILQ_FIRST(&(*cond)->c_queue))
677 THR_SCHED_LOCK(curthread, pthread);
678 cond_queue_remove(*cond, pthread);
679 pthread->sigbackout = NULL;
680 if ((pthread->kseg == curthread->kseg) &&
681 (pthread->active_priority >
684 kmbx = _thr_setrunnable_unlocked(pthread);
685 THR_SCHED_UNLOCK(curthread, pthread);
712 check_continuation(struct pthread *curthread, struct pthread_cond *cond,
735 struct pthread *curthread = (struct pthread *)arg;
769 static inline struct pthread *
772 struct pthread *pthread;
774 while ((pthread = TAILQ_FIRST(&cond->c_queue)) != NULL) {
775 TAILQ_REMOVE(&cond->c_queue, pthread, sqe);
776 THR_CONDQ_CLEAR(pthread);
777 if ((pthread->timeout == 0) && (pthread->interrupted == 0))
787 return (pthread);
795 cond_queue_remove(pthread_cond_t cond, struct pthread *pthread)
803 if (THR_IN_CONDQ(pthread)) {
804 TAILQ_REMOVE(&cond->c_queue, pthread, sqe);
805 THR_CONDQ_CLEAR(pthread);
814 cond_queue_enq(pthread_cond_t cond, struct pthread *pthread)
816 struct pthread *tid = TAILQ_LAST(&cond->c_queue, cond_head);
818 THR_ASSERT(!THR_IN_SYNCQ(pthread),
826 if ((tid == NULL) || (pthread->active_priority <= tid->active_priority))
827 TAILQ_INSERT_TAIL(&cond->c_queue, pthread, sqe);
830 while (pthread->active_priority <= tid->active_priority)
832 TAILQ_INSERT_BEFORE(tid, pthread, sqe);
834 THR_CONDQ_SET(pthread);
835 pthread->data.cond = cond;