rpcs3/Utilities/SMutex.cpp

23 lines
332 B
C++
Raw Normal View History

2014-08-28 16:29:05 +00:00
#include "stdafx.h"
#include "Emu/System.h"
#include "Emu/CPU/CPUThread.h"
#include "Utilities/SMutex.h"
2014-02-05 11:55:32 +00:00
2014-08-22 16:36:27 +00:00
bool SM_IsAborted()
{
return Emu.IsStopped();
}
void SM_Sleep()
2014-02-05 11:55:32 +00:00
{
if (NamedThreadBase* t = GetCurrentNamedThread())
{
t->WaitForAnySignal();
}
else
{
2014-07-12 07:02:39 +00:00
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
2014-02-05 11:55:32 +00:00
}