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:
parent
e5d692babe
commit
e1b810b613
@ -109,9 +109,9 @@ int __attribute__((used)) sched_run(void)
|
||||
active_thread = NULL;
|
||||
}
|
||||
|
||||
while (!runqueue_bitcache) {
|
||||
do {
|
||||
sched_arch_idle();
|
||||
}
|
||||
} while (!runqueue_bitcache);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user