mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-20 22:05:12 +00:00
Another try
This commit is contained in:
parent
a8b5912340
commit
652c5901f8
12 changed files with 221 additions and 208 deletions
|
|
@ -1,11 +1,10 @@
|
|||
#pragma once
|
||||
#include "BEType.h"
|
||||
#include "Emu/System.h"
|
||||
|
||||
extern void SM_Sleep();
|
||||
extern size_t SM_GetCurrentThreadId();
|
||||
extern u32 SM_GetCurrentCPUThreadId();
|
||||
extern be_t<u32> SM_GetCurrentCPUThreadIdBE();
|
||||
bool SM_IsAborted();
|
||||
void SM_Sleep();
|
||||
size_t SM_GetCurrentThreadId();
|
||||
u32 SM_GetCurrentCPUThreadId();
|
||||
be_t<u32> SM_GetCurrentCPUThreadIdBE();
|
||||
|
||||
enum SMutexResult
|
||||
{
|
||||
|
|
@ -66,7 +65,7 @@ public:
|
|||
|
||||
SMutexResult trylock(T tid)
|
||||
{
|
||||
if (Emu.IsStopped())
|
||||
if (SM_IsAborted())
|
||||
{
|
||||
return SMR_ABORT;
|
||||
}
|
||||
|
|
@ -90,7 +89,7 @@ public:
|
|||
|
||||
SMutexResult unlock(T tid, T to = GetFreeValue())
|
||||
{
|
||||
if (Emu.IsStopped())
|
||||
if (SM_IsAborted())
|
||||
{
|
||||
return SMR_ABORT;
|
||||
}
|
||||
|
|
@ -148,7 +147,7 @@ public:
|
|||
{
|
||||
if (!tid)
|
||||
{
|
||||
if (!Emu.IsStopped())
|
||||
if (!SM_IsAborted())
|
||||
{
|
||||
assert(!"SMutexLockerBase: thread id == 0");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue