Rewrote scheduler to use concurrent queues instead of atomic waits, added thread priorities

This commit is contained in:
Mr-Wiseguy
2023-07-07 14:21:06 -04:00
parent 0fdfc5f7fe
commit 5b594048db
8 changed files with 164 additions and 130 deletions
+3
View File
@@ -61,6 +61,9 @@ uint64_t time_now() {
}
void timer_thread(RDRAM_ARG1) {
Multilibultra::set_native_thread_name("Timer Thread");
Multilibultra::set_native_thread_priority(Multilibultra::ThreadPriority::VeryHigh);
// Lambda comparator function to keep the set ordered
auto timer_sort = [PASS_RDRAM1](PTR(OSTimer) a_, PTR(OSTimer) b_) {
OSTimer* a = TO_PTR(OSTimer, a_);