rCriticalSection & rSemaphore removed

SC_Semaphore errors fixed
Room for interrupt threads
This commit is contained in:
Nekotekina
2014-06-22 14:59:28 +04:00
parent 2fad8039f5
commit 30b8e51234
15 changed files with 84 additions and 148 deletions
-37
View File
@@ -1,34 +1,5 @@
#pragma once
enum rSemaStatus
{
rSEMA_BUSY,
rSEMA_OTHER
};
struct rSemaphore
{
rSemaphore();
rSemaphore(const rSemaphore& other) = delete;
~rSemaphore();
rSemaphore(int initial_count, int max_count);
void Wait();
rSemaStatus TryWait();
void Post();
void WaitTimeout(u64 timeout);
private:
void *handle;
};
struct rCriticalSection
{
rCriticalSection();
rCriticalSection(const rCriticalSection& other) = delete;
~rCriticalSection();
void Enter();
void Leave();
void *handle;
};
struct rTimer
{
rTimer();
@@ -43,14 +14,6 @@ private:
void rSleep(u32 time);
void rMicroSleep(u64 time);
struct rCriticalSectionLocker
{
rCriticalSectionLocker(const rCriticalSection& other);
~rCriticalSectionLocker();
private:
void *handle;
};
struct rThread
{
static bool IsMain();