From 1da83854b0e67ac5061db878c27fc6247ad2362b Mon Sep 17 00:00:00 2001 From: kanjitalk755 Date: Sat, 25 Jul 2020 22:45:07 +0900 Subject: [PATCH] fix freezing bug on launch --- SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-cpu.cpp | 1 + SheepShaver/src/kpx_cpu/src/cpu/spcflags.hpp | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-cpu.cpp b/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-cpu.cpp index eefa1f95..39a31ecb 100644 --- a/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-cpu.cpp +++ b/SheepShaver/src/kpx_cpu/src/cpu/ppc/ppc-cpu.cpp @@ -372,6 +372,7 @@ powerpc_cpu::powerpc_cpu(task_struct *parent_task) #if PPC_ENABLE_JIT use_jit = false; #endif + spcflags().init(); ++ppc_refcount; initialize(); } diff --git a/SheepShaver/src/kpx_cpu/src/cpu/spcflags.hpp b/SheepShaver/src/kpx_cpu/src/cpu/spcflags.hpp index 0b521d53..d379f1cb 100644 --- a/SheepShaver/src/kpx_cpu/src/cpu/spcflags.hpp +++ b/SheepShaver/src/kpx_cpu/src/cpu/spcflags.hpp @@ -41,8 +41,10 @@ class basic_spcflags public: basic_spcflags() - : mask(0), lock(SPIN_LOCK_UNLOCKED) - { } + { init(); } + + void init() + { mask = 0; lock = SPIN_LOCK_UNLOCKED; } bool empty() const { return (mask == 0); }