mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-01 15:08:21 +00:00
sched: actually set cpus as idle
This commit is contained in:
@@ -227,6 +227,12 @@ found:
|
|||||||
if (thread->cputarget == NULL)
|
if (thread->cputarget == NULL)
|
||||||
--current_cpu()->stealable_thread_count;
|
--current_cpu()->stealable_thread_count;
|
||||||
|
|
||||||
|
if (thread == current_cpu()->idlethread) {
|
||||||
|
spinlock_acquire(&sched_idle_cpu_bitmap_lock);
|
||||||
|
bitmap_set(&sched_idle_cpu_bitmap, current_cpu()->internal_id, 1);
|
||||||
|
spinlock_release(&sched_idle_cpu_bitmap_lock);
|
||||||
|
}
|
||||||
|
|
||||||
__assert((thread->flags & THREAD_FLAGS_QUEUED) == 0);
|
__assert((thread->flags & THREAD_FLAGS_QUEUED) == 0);
|
||||||
__assert((thread->flags & THREAD_FLAGS_RUNNING) == 0);
|
__assert((thread->flags & THREAD_FLAGS_RUNNING) == 0);
|
||||||
return thread;
|
return thread;
|
||||||
|
|||||||
Reference in New Issue
Block a user