mirror of
https://github.com/izzy2lost/WeeU.git
synced 2026-07-06 00:19:59 -07:00
Added thread fences to FiberBoost & fixed x64 build
This commit is contained in:
@@ -130,7 +130,7 @@ void* ATTR_MS_ABI PPCRecompiler_virtualHLE(PPCInterpreter_t* hCPU, uint32 hleFun
|
||||
hCPU->remainingCycles -= 500; // let subtract about 500 cycles for each HLE call
|
||||
hCPU->gpr[3] = 0;
|
||||
PPCInterpreter_nextInstruction(hCPU);
|
||||
return ppcInterpreterCurrentInstance;
|
||||
return PPCInterpreter_getCurrentInstance();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -139,7 +139,7 @@ void* ATTR_MS_ABI PPCRecompiler_virtualHLE(PPCInterpreter_t* hCPU, uint32 hleFun
|
||||
hleCall(hCPU);
|
||||
}
|
||||
hCPU->rspTemp = prevRSPTemp;
|
||||
return ppcInterpreterCurrentInstance;
|
||||
return PPCInterpreter_getCurrentInstance();
|
||||
}
|
||||
|
||||
void ATTR_MS_ABI PPCRecompiler_getTBL(PPCInterpreter_t* hCPU, uint32 gprIndex)
|
||||
|
||||
@@ -68,7 +68,9 @@ void Fiber::Switch(Fiber& targetFiber)
|
||||
FiberImpl* _targetFiber = static_cast<FiberImpl*>(targetFiber.m_implData);
|
||||
_targetFiber->previousFiber = _currentFiber;
|
||||
sCurrentFiber = &targetFiber;
|
||||
std::atomic_thread_fence(std::memory_order_seq_cst);
|
||||
auto transfer = boost::context::detail::jump_fcontext(_targetFiber->context, _targetFiber);
|
||||
std::atomic_thread_fence(std::memory_order_seq_cst);
|
||||
if (_currentFiber->previousFiber == nullptr)
|
||||
{
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user