mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-07 15:31:26 +12:00
waiter_map_t : concept changed
Purpose-specific waiter_map_t objects instead of global one. SM_Sleep() removed.
This commit is contained in:
parent
48eb66383b
commit
18b69cac99
10 changed files with 86 additions and 116 deletions
|
@ -2,7 +2,6 @@
|
|||
#include "Emu/Memory/atomic_type.h"
|
||||
|
||||
bool SM_IsAborted();
|
||||
void SM_Sleep();
|
||||
|
||||
enum SMutexResult
|
||||
{
|
||||
|
@ -20,8 +19,7 @@ template
|
|||
<
|
||||
typename T,
|
||||
const u64 free_value = 0,
|
||||
const u64 dead_value = 0xffffffffffffffffull,
|
||||
void (*wait)() = SM_Sleep
|
||||
const u64 dead_value = 0xffffffffffffffffull
|
||||
>
|
||||
class SMutexBase
|
||||
{
|
||||
|
@ -118,7 +116,7 @@ public:
|
|||
default: return res;
|
||||
}
|
||||
|
||||
if (wait != nullptr) wait();
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||
|
||||
if (timeout && counter++ > timeout)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue