mirror of
https://github.com/Zelda64Recomp/Zelda64Recomp
synced 2026-09-04 02:49:34 -04:00
Fixed race condition with thread deletion, update RT64
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user