Badminton-Scoreboard/Libraries/libil2cpp/include/os/ReaderWriterLockImpl.h

42 lines
570 B
C
Raw Normal View History

2023-10-08 02:24:48 +00:00
#pragma once
#include "os/Mutex.h"
namespace il2cpp
{
namespace os
{
class ReaderWriterLockImpl
{
public:
void LockExclusive()
{
m_Mutex.Lock();
}
void LockShared()
{
m_Mutex.Lock();
}
void ReleaseExclusive()
{
m_Mutex.Unlock();
}
void ReleaseShared()
{
m_Mutex.Unlock();
}
FastMutex* GetOSHandle()
{
return &m_Mutex;
}
private:
FastMutex m_Mutex;
};
}
}