用于EagleEye3.0 规则集漏报和误报测试的示例项目,项目收集于github和gitee
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.

48 lines
784 B

10 months ago
/**
* Copyright (C) 2014-2050
* All rights reserved.
*
* @file SCriticalSection.h
* @brief
* @version v1.0
* @author SOUI group
* @date 2014/09/27
*
* Describe CriticalSection
*/
#pragma once
#include <utilities-def.h>
#include <Windows.h>
namespace SOUI
{
class UTILITIES_API SCriticalSection
{
public:
SCriticalSection();
virtual ~SCriticalSection();
void Enter();
void Leave();
protected:
CRITICAL_SECTION m_cs;
};
class UTILITIES_API SAutoLock
{
public:
SAutoLock(SCriticalSection & cs):m_cs(cs)
{
m_cs.Enter();
}
~SAutoLock()
{
m_cs.Leave();
}
protected:
SCriticalSection & m_cs;
};
}