Lines Matching refs:thread

25 #include <thread.h>
36 // for events. Those events are team, thread, and image changes (added/removed),
73 virtual void ThreadEnqueuedInRunQueue(Thread* thread);
74 virtual void ThreadRemovedFromRunQueue(Thread* thread);
89 bool _ThreadAdded(Thread* thread);
90 bool _ThreadRemoved(Thread* thread);
213 /*! Notifies the profiler thread when the profiling buffer is full enough.
303 // Wake up the user thread, if it is waiting, and mark profiling
488 while (Thread* thread = iterator.Next()) {
491 bool added = _ThreadAdded(thread);
494 thread->ReleaseReference();
520 Thread* thread = gCPU[i].running_thread;
521 if (thread != NULL)
522 ThreadScheduled(thread, thread);
571 Thread* thread = thread_get_current_thread();
572 fWaitingProfilerThread = thread;
574 thread_prepare_to_block(thread, B_CAN_INTERRUPT,
658 Thread* thread = (Thread*)event->GetPointer("threadStruct", NULL);
659 if (thread == NULL)
665 _ThreadAdded(thread);
669 // When we're still doing the initial thread list scan, we are
673 || thread->serial_number <= fLastThreadAddedSerialNumber) {
674 _ThreadRemoved(thread);
744 SystemProfiler::ThreadEnqueuedInRunQueue(Thread* thread)
760 event->thread = thread->id;
761 event->priority = thread->priority;
765 // Unblock the profiler thread, if necessary, but don't unblock the thread,
769 if (thread->wait.type != THREAD_BLOCK_TYPE_CONDITION_VARIABLE)
775 SystemProfiler::ThreadRemovedFromRunQueue(Thread* thread)
791 event->thread = thread->id;
795 // unblock the profiler thread, if necessary
808 // If the old thread starts waiting, handle the wait object.
820 event->thread = newThread->id;
828 // unblock the profiler thread, if necessary
956 SystemProfiler::_ThreadAdded(Thread* thread)
958 ThreadLocker threadLocker(thread);
963 // actually starting the thread.
964 if (!fThreadNotificationsEnabled && !thread->IsAlive())
967 if (thread->serial_number > fLastThreadAddedSerialNumber)
968 fLastThreadAddedSerialNumber = thread->serial_number;
976 event->team = thread->team->id;
977 event->thread = thread->id;
978 strlcpy(event->name, thread->name, sizeof(event->name));
987 SystemProfiler::_ThreadRemoved(Thread* thread)
990 // had already been removed from the global thread list when we did the
994 ThreadLocker threadLocker(thread);
1004 event->team = thread->team->id;
1005 event->thread = thread->id;
1113 event->thread = owner->thread;
1403 Thread* thread = thread_get_current_thread();
1404 int cpu = thread->cpu->cpu_num;
1420 event->thread = thread->id;