mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 13:31:27 +12:00
SSemaphore basic implementation
Set for RSX
This commit is contained in:
parent
7fca980887
commit
1c4ae999d6
8 changed files with 127 additions and 18 deletions
|
@ -6,6 +6,7 @@
|
|||
#include <mutex>
|
||||
#include <atomic>
|
||||
#include <condition_variable>
|
||||
#include <Utilities/SSemaphore.h>
|
||||
|
||||
class ThreadExec;
|
||||
|
||||
|
@ -138,16 +139,6 @@ public:
|
|||
bool IsBusy() const { return m_busy; }
|
||||
};
|
||||
|
||||
static __forceinline bool SemaphorePostAndWait(rSemaphore& sem)
|
||||
{
|
||||
if(sem.TryWait() != rSEMA_BUSY) return false;
|
||||
|
||||
sem.Post();
|
||||
sem.Wait();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
class StepThread : public ThreadBase
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue