mirror of https://github.com/PCSX2/pcsx2.git
Merge pull request #478 from PCSX2/linux-mtvu-crash-after-shutdown
MTVU: fix linux crash after a shutdown
This commit is contained in:
commit
06ee41957e
|
@ -69,6 +69,8 @@ VU_Thread::~VU_Thread() throw()
|
|||
|
||||
void VU_Thread::Reset()
|
||||
{
|
||||
ScopedLock lock(mtxBusy);
|
||||
|
||||
read_pos = 0;
|
||||
write_pos = 0;
|
||||
write_offset = 0;
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include "IopCommon.h"
|
||||
#include "VUmicro.h"
|
||||
#include "newVif.h"
|
||||
#include "MTVU.h"
|
||||
|
||||
#include "SamplProf.h"
|
||||
|
||||
|
@ -418,6 +419,12 @@ void SysMainMemory::DecommitAll()
|
|||
Console.WriteLn( Color_Blue, "Decommitting host memory for virtual systems..." );
|
||||
ConsoleIndentScope indent(1);
|
||||
|
||||
// On linux, the MTVU isn't empty and the thread still uses the m_ee/m_vu memory
|
||||
vu1Thread.WaitVU();
|
||||
// The EE thread must be stopped here command mustn't be send
|
||||
// to the ring. Let's call it an extra safety valve :)
|
||||
vu1Thread.Reset();
|
||||
|
||||
m_ee.Decommit();
|
||||
m_iop.Decommit();
|
||||
m_vu.Decommit();
|
||||
|
|
Loading…
Reference in New Issue