This commit is contained in:
Oleg Korshul
2018-04-11 11:51:43 +03:00
parent e753476826
commit 7d2f96d284
8 changed files with 438 additions and 270 deletions

View File

@ -32,19 +32,17 @@
#ifndef _BUILD_TEMPORARY_CS_H_
#define _BUILD_TEMPORARY_CS_H_
#ifndef CRITICALSECTION_USE_DYNAMIC_LIBRARY
#define CRITICALSECTION_DECL_EXPORT
#else
#include "../common/base_export.h"
#define CRITICALSECTION_DECL_EXPORT Q_DECL_EXPORT
#endif
namespace NSCriticalSection
{
class CRITICAL_SECTION_NATIVE
{
public:
CRITICAL_SECTION_NATIVE() {};
virtual ~CRITICAL_SECTION_NATIVE() {};
virtual void Enter() = 0;
virtual void Leave() = 0;
};
class CRITICAL_SECTION
class CRITICAL_SECTION_NATIVE;
class CRITICALSECTION_DECL_EXPORT CRITICAL_SECTION
{
private:
CRITICAL_SECTION_NATIVE* m_pCS;
@ -61,7 +59,7 @@ namespace NSCriticalSection
};
}
class CTemporaryCS
class CRITICALSECTION_DECL_EXPORT CTemporaryCS
{
public:
CTemporaryCS(NSCriticalSection::CRITICAL_SECTION* cs);
@ -72,4 +70,4 @@ protected:
NSCriticalSection::CRITICAL_SECTION* m_cs;
};
#endif // _BUILD_TEMPORARY_CS_H_
#endif // _BUILD_TEMPORARY_CS_H_