fix freezing bug on launch

This commit is contained in:
kanjitalk755 2020-07-25 22:45:07 +09:00
parent 5b31736785
commit 1da83854b0
2 changed files with 5 additions and 2 deletions

View File

@ -372,6 +372,7 @@ powerpc_cpu::powerpc_cpu(task_struct *parent_task)
#if PPC_ENABLE_JIT #if PPC_ENABLE_JIT
use_jit = false; use_jit = false;
#endif #endif
spcflags().init();
++ppc_refcount; ++ppc_refcount;
initialize(); initialize();
} }

View File

@ -41,8 +41,10 @@ class basic_spcflags
public: public:
basic_spcflags() basic_spcflags()
: mask(0), lock(SPIN_LOCK_UNLOCKED) { init(); }
{ }
void init()
{ mask = 0; lock = SPIN_LOCK_UNLOCKED; }
bool empty() const bool empty() const
{ return (mask == 0); } { return (mask == 0); }