SSemaphore basic implementation

Set for RSX
This commit is contained in:
Nekotekina 2014-06-20 23:56:19 +04:00
parent 7fca980887
commit 1c4ae999d6
8 changed files with 127 additions and 18 deletions

View file

@ -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
{