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); }