mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-01-11 10:30:09 +00:00
fix for deadlock in timer
This commit is contained in:
parent
3ce86cee1f
commit
6c20f2c4d9
@ -375,8 +375,8 @@ int16 RmvTime(uint32 tm)
|
|||||||
thread_suspend(timer_thread);
|
thread_suspend(timer_thread);
|
||||||
#endif
|
#endif
|
||||||
#if PRECISE_TIMING_POSIX
|
#if PRECISE_TIMING_POSIX
|
||||||
timer_thread_suspend();
|
|
||||||
pthread_mutex_lock(&wakeup_time_lock);
|
pthread_mutex_lock(&wakeup_time_lock);
|
||||||
|
timer_thread_suspend();
|
||||||
#endif
|
#endif
|
||||||
if (ReadMacInt16(tm + qType) & 0x8000) {
|
if (ReadMacInt16(tm + qType) & 0x8000) {
|
||||||
|
|
||||||
@ -492,8 +492,8 @@ int16 PrimeTime(uint32 tm, int32 time)
|
|||||||
thread_suspend(timer_thread);
|
thread_suspend(timer_thread);
|
||||||
#endif
|
#endif
|
||||||
#if PRECISE_TIMING_POSIX
|
#if PRECISE_TIMING_POSIX
|
||||||
timer_thread_suspend();
|
|
||||||
pthread_mutex_lock(&wakeup_time_lock);
|
pthread_mutex_lock(&wakeup_time_lock);
|
||||||
|
timer_thread_suspend();
|
||||||
#endif
|
#endif
|
||||||
WriteMacInt16(tm + qType, ReadMacInt16(tm + qType) | 0x8000);
|
WriteMacInt16(tm + qType, ReadMacInt16(tm + qType) | 0x8000);
|
||||||
enqueue_tm(tm);
|
enqueue_tm(tm);
|
||||||
@ -647,8 +647,8 @@ void TimerInterrupt(void)
|
|||||||
thread_suspend(timer_thread);
|
thread_suspend(timer_thread);
|
||||||
#endif
|
#endif
|
||||||
#if PRECISE_TIMING_POSIX
|
#if PRECISE_TIMING_POSIX
|
||||||
timer_thread_suspend();
|
|
||||||
pthread_mutex_lock(&wakeup_time_lock);
|
pthread_mutex_lock(&wakeup_time_lock);
|
||||||
|
timer_thread_suspend();
|
||||||
#endif
|
#endif
|
||||||
wakeup_time = wakeup_time_max;
|
wakeup_time = wakeup_time_max;
|
||||||
for (TMDesc *d = tmDescList; d; d = d->next)
|
for (TMDesc *d = tmDescList; d; d = d->next)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user