Lines Matching defs:thread

34 #include <thread.h>
74 queued_thread(Thread *thread, int32 count)
76 thread(thread),
82 Thread *thread;
188 kprintf(" %" B_PRId32, entry->thread->id);
334 thread_unblock(entry->thread, B_BAD_SEM_ID);
372 dprintf("thread %" B_PRId32 " tried to delete kernel semaphore "
445 " <last acquirer> - The thread that last acquired the semaphore.\n"
598 /*! Forcibly removes a thread from a semaphores wait queue. May have to wake up
600 Must be called with semaphore lock held. The thread lock must not be held.
618 // thread.
620 SpinLocker schedulerLocker(entry->thread->scheduler_lock);
621 if (thread_is_blocked(entry->thread)) {
622 // The thread is still waiting. If its count is satisfied, unblock
623 // it. Otherwise we can't unblock any other thread.
627 thread_unblock_locked(entry->thread, B_OK);
630 // The thread is no longer waiting, but still queued, which means
762 dprintf("thread %" B_PRId32 " tried to acquire kernel semaphore "
786 Thread *thread = thread_get_current_thread();
788 TRACE(("switch_sem_etc(id = %ld): block name = %s, thread = %p,"
789 " name = %s\n", id, sSems[slot].u.used.name, thread, thread->name));
791 // do a quick check to see if the thread has any pending signals
792 // this should catch most of the cases where the thread had a signal
793 SpinLocker schedulerLocker(thread->scheduler_lock);
794 if (thread_is_interrupted(thread, flags)) {
811 queued_thread queueEntry(thread, count);
815 thread_prepare_to_block(thread, flags, THREAD_BLOCK_TYPE_SEMAPHORE,
846 "thread %ld (%s)\n", id, sSems[slot].u.used.name, thread->id,
847 thread->name));
903 dprintf("thread %" B_PRId32 " tried to release kernel semaphore.\n",
945 SpinLocker schedulerLock(entry->thread->scheduler_lock);
946 if (thread_is_blocked(entry->thread)) {
947 // The thread is still waiting. If its count is satisfied,
948 // unblock it. Otherwise we can't unblock any other thread.
955 thread_unblock_locked(entry->thread, unblockStatus);
962 // The thread is no longer waiting, but still queued, which
974 // If we've unblocked another thread reschedule, if we've not explicitly