1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

sched: simplify MODULE_CORE_IDLE_THREAD conditional

This commit is contained in:
Koen Zandberg 2020-07-29 14:00:57 +02:00
parent 764b3102e4
commit dd45eaa472
No known key found for this signature in database
GPG Key ID: 0895A893E6D2985B

View File

@ -110,18 +110,15 @@ int __attribute__((used)) sched_run(void)
thread_t *active_thread = thread_get_active();
thread_t *previous_thread = active_thread;
if (!IS_USED(MODULE_CORE_IDLE_THREAD)) {
if (!runqueue_bitcache) {
if (active_thread) {
_unschedule(active_thread);
active_thread = NULL;
}
active_thread = NULL;
do {
sched_arch_idle();
} while (!runqueue_bitcache);
if (!IS_USED(MODULE_CORE_IDLE_THREAD) && !runqueue_bitcache) {
if (active_thread) {
_unschedule(active_thread);
}
active_thread = NULL;
do {
sched_arch_idle();
} while (!runqueue_bitcache);
}
sched_context_switch_request = 0;