scheduler: Remove some unnecessary checks against idle threads

This commit is contained in:
Pawel Dziepak
2013-11-28 17:53:19 +01:00
parent f9ee217ad6
commit f2243876df
@@ -587,9 +587,6 @@ compute_thread_load(Thread* thread)
static inline void static inline void
thread_goes_away(Thread* thread) thread_goes_away(Thread* thread)
{ {
if (thread_is_idle_thread(thread))
return;
scheduler_thread_data* schedulerThreadData = thread->scheduler_data; scheduler_thread_data* schedulerThreadData = thread->scheduler_data;
schedulerThreadData->last_interrupt_time = 0; schedulerThreadData->last_interrupt_time = 0;
@@ -628,7 +625,6 @@ enqueue(Thread* thread, bool newOne)
scheduler_thread_data* schedulerThreadData = thread->scheduler_data; scheduler_thread_data* schedulerThreadData = thread->scheduler_data;
schedulerThreadData->time_left = 0; schedulerThreadData->time_left = 0;
if (!thread_is_idle_thread(thread))
schedulerThreadData->went_sleep_count = 0; schedulerThreadData->went_sleep_count = 0;
int32 threadPriority = get_effective_priority(thread); int32 threadPriority = get_effective_priority(thread);
@@ -659,7 +655,6 @@ enqueue(Thread* thread, bool newOne)
gPinnedRunQueues[targetCPU].PushBack(thread, threadPriority); gPinnedRunQueues[targetCPU].PushBack(thread, threadPriority);
else { else {
gRunQueues[targetCore].PushBack(thread, threadPriority); gRunQueues[targetCore].PushBack(thread, threadPriority);
if (!thread_is_idle_thread(thread))
gCoreEntries[targetCore].fThreadList.Insert(thread->scheduler_data); gCoreEntries[targetCore].fThreadList.Insert(thread->scheduler_data);
} }
runQueueLocker.Unlock(); runQueueLocker.Unlock();