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
+2 -7
View File
@@ -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,8 +625,7 @@ 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);
T(EnqueueThread(thread, threadPriority)); T(EnqueueThread(thread, threadPriority));
@@ -659,8 +655,7 @@ 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();