You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
907 B
35 lines
907 B
#include <pch.cpp>
|
|
#pragma hdrstop
|
|
|
|
#include "rwlock.h"
|
|
using namespace CertSrv;
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
CReadWriteLock::CReadWriteLock()
|
|
{
|
|
RtlInitializeResource(&m_RtlLock);
|
|
}
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
CReadWriteLock::~CReadWriteLock()
|
|
{
|
|
RtlDeleteResource(&m_RtlLock);
|
|
}
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
void CReadWriteLock::GetExclusive()
|
|
{
|
|
RtlAcquireResourceExclusive(&m_RtlLock, TRUE);
|
|
}
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
void CReadWriteLock::GetShared()
|
|
{
|
|
RtlAcquireResourceShared(&m_RtlLock, TRUE);
|
|
}
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
void CReadWriteLock::Release()
|
|
{
|
|
RtlReleaseResource(&m_RtlLock);
|
|
}
|