Lines Matching defs:thread

43 	Thread*	thread;
48 thread(NULL)
57 void Lock(Team* team, Thread* thread)
62 this->thread = thread;
64 if (thread != NULL) {
65 thread->AcquireReference();
66 thread->Lock();
69 // We don't check thread->team != team here, since this method can be
80 thread = Thread::GetAndLock(threadID);
81 if (thread == NULL)
83 if (thread->team != team)
87 UserTimer* timer = thread != NULL
88 ? thread->UserTimerFor(timerID) : team->UserTimerFor(timerID);
98 if (thread != NULL) {
99 thread->UnlockAndReleaseReference();
100 thread = NULL;
624 \param unscheduledThread If not \c NULL, this is the thread that is
637 Thread* thread = gCPU[i].running_thread;
638 if (thread != unscheduledThread && thread->team == fTeam)
694 \param unscheduling \c true, when the current thread is in the process of
938 // Get the thread. If it doesn't exist anymore, just don't schedule the
959 // If the thread is currently running, also schedule a kernel timer.
1012 Called when the thread whose CPU time is referred to by the timer is
1013 scheduled, or, when the timer was just set and the thread is already
1051 Called when the thread whose CPU time is referred to by the timer is
1069 // the thread (ignoring the time since last_time) and manually fire the
1231 create_timer(clockid_t clockID, int32 timerID, Team* team, Thread* thread,
1309 if (thread != NULL && (flags & USER_TIMER_SIGNAL_THREAD) != 0) {
1310 // The signal shall be sent to the thread.
1311 signalEvent = ThreadSignalEvent::Create(thread,
1344 // add it to the team/thread
1346 timerLocker.Lock(team, thread);
1348 status_t error = thread != NULL
1349 ? thread->AddUserTimer(timer) : team->AddUserTimer(timer);
1367 /*! Called when the CPU time clock of the given thread has been set.
1371 \param thread The thread whose CPU time clock has been set.
1376 thread_clock_changed(Thread* thread, bigtime_t changedBy)
1379 = thread->CPUTimeUserTimerIterator();
1408 /*! Creates the pre-defined user timers for the given thread.
1409 The thread may not have been added to its team yet, hence the team must be
1412 \param team The thread's (future) team.
1413 \param thread The thread whose pre-defined timers shall be created.
1417 user_timer_create_thread_timers(Team* team, Thread* thread)
1425 team, thread, USER_TIMER_SIGNAL_THREAD, event, NULL, true);
1487 Thread* thread = thread_get_current_thread();
1488 InterruptsSpinLocker timeLocker(thread->time_lock);
1489 _time = thread->CPUTime(false);
1549 user_timer_stop_cpu_timers(Thread* thread, Thread* nextThread)
1551 // stop thread timers
1553 = thread->CPUTimeUserTimerIterator();
1559 if (nextThread == NULL || nextThread->team != thread->team) {
1561 = thread->team->CPUTimeUserTimerIterator();
1563 timer->Update(thread, thread);
1570 user_timer_continue_cpu_timers(Thread* thread, Thread* previousThread)
1573 if (previousThread == NULL || previousThread->team != thread->team) {
1575 = thread->team->CPUTimeUserTimerIterator();
1577 timer->Update(NULL, thread);
1581 // start thread timers
1583 = thread->CPUTimeUserTimerIterator();
1640 Thread* thread = thread_get_current_thread();
1641 InterruptsSpinLocker timeLocker(thread->time_lock);
1642 bigtime_t diff = time - thread->CPUTime(false);
1643 thread->cpu_clock_offset += diff;
1645 thread_clock_changed(thread, diff);
1707 // copy thread creation attributes from userland, if specified
1717 // get team and thread
1719 Thread* thread = NULL;
1721 thread = Thread::GetAndLock(threadID);
1722 if (thread == NULL)
1725 thread->Unlock();
1727 BReference<Thread> threadReference(thread, true);
1730 return create_timer(clockID, -1, team, thread, flags, event,
1754 timerLocker.thread->RemoveUserTimer(timer);