From 6c20f2c4d9fab2d8f580d6d158550aad48053dd2 Mon Sep 17 00:00:00 2001 From: kanjitalk755 Date: Sat, 7 Nov 2020 11:52:24 +0900 Subject: [PATCH] fix for deadlock in timer --- SheepShaver/src/timer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SheepShaver/src/timer.cpp b/SheepShaver/src/timer.cpp index 3edd6ca0..f8a52ecc 100644 --- a/SheepShaver/src/timer.cpp +++ b/SheepShaver/src/timer.cpp @@ -375,8 +375,8 @@ int16 RmvTime(uint32 tm) thread_suspend(timer_thread); #endif #if PRECISE_TIMING_POSIX - timer_thread_suspend(); pthread_mutex_lock(&wakeup_time_lock); + timer_thread_suspend(); #endif if (ReadMacInt16(tm + qType) & 0x8000) { @@ -492,8 +492,8 @@ int16 PrimeTime(uint32 tm, int32 time) thread_suspend(timer_thread); #endif #if PRECISE_TIMING_POSIX - timer_thread_suspend(); pthread_mutex_lock(&wakeup_time_lock); + timer_thread_suspend(); #endif WriteMacInt16(tm + qType, ReadMacInt16(tm + qType) | 0x8000); enqueue_tm(tm); @@ -647,8 +647,8 @@ void TimerInterrupt(void) thread_suspend(timer_thread); #endif #if PRECISE_TIMING_POSIX - timer_thread_suspend(); pthread_mutex_lock(&wakeup_time_lock); + timer_thread_suspend(); #endif wakeup_time = wakeup_time_max; for (TMDesc *d = tmDescList; d; d = d->next)