1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:12:57 +01:00

core/sched: tiny logic optimization in idle case

In the case that the no_thread_idle feature is active, the
runqueue_bitcache is checked twice in the case no thread is available to
schedule. This changes the inner while loop to a do-while loop to save
one check from the initial loop iteration, saving a cycle or so in the
idle case.
This commit is contained in:
Koen Zandberg 2020-07-20 23:26:47 +02:00
parent e5d692babe
commit e1b810b613
No known key found for this signature in database
GPG Key ID: 0895A893E6D2985B

View File

@ -109,9 +109,9 @@ int __attribute__((used)) sched_run(void)
active_thread = NULL;
}
while (!runqueue_bitcache) {
do {
sched_arch_idle();
}
} while (!runqueue_bitcache);
}
}