Fixed race condition with thread deletion, update RT64

This commit is contained in:
Mr-Wiseguy
2024-04-27 15:06:26 -04:00
parent 598948bfb6
commit 7c37f8ef8e
8 changed files with 101 additions and 87 deletions
+2 -4
View File
@@ -68,8 +68,7 @@ bool do_send(RDRAM_ARG PTR(OSMesgQueue) mq_, OSMesg msg, bool jam, bool block) {
while (MQ_IS_FULL(mq)) {
debug_printf("[Message Queue] Thread %d is blocked on send\n", TO_PTR(OSThread, ultramodern::this_thread())->id);
ultramodern::thread_queue_insert(PASS_RDRAM GET_MEMBER(OSMesgQueue, mq_, blocked_on_send), ultramodern::this_thread());
ultramodern::run_next_thread(PASS_RDRAM1);
ultramodern::wait_for_resumed(PASS_RDRAM1);
ultramodern::run_next_thread_and_wait(PASS_RDRAM1);
}
}
@@ -107,8 +106,7 @@ bool do_recv(RDRAM_ARG PTR(OSMesgQueue) mq_, PTR(OSMesg) msg_, bool block) {
while (MQ_IS_EMPTY(mq)) {
debug_printf("[Message Queue] Thread %d is blocked on receive\n", TO_PTR(OSThread, ultramodern::this_thread())->id);
ultramodern::thread_queue_insert(PASS_RDRAM GET_MEMBER(OSMesgQueue, mq_, blocked_on_recv), ultramodern::this_thread());
ultramodern::run_next_thread(PASS_RDRAM1);
ultramodern::wait_for_resumed(PASS_RDRAM1);
ultramodern::run_next_thread_and_wait(PASS_RDRAM1);
}
}