Badminton-Scoreboard/Libraries/libil2cpp/include/os/ReaderWriterLockImpl.h
2023-10-08 10:24:48 +08:00

42 lines
570 B
C++

#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;
};
}
}