raSystem  1.0 bata
raCriticalSection.cpp
Go to the documentation of this file.
1 #include "..\include\raMain.h"
2 
3 namespace System
4 {
6  {
7  }
8 
10  {
11  }
13  {
14  InitializeCriticalSection( &m_Crit );
15  SetCreated(true);
16  }
17  bool raCriticalSection::Create(DWORD SpinCount)
18  {
19  if(InitializeCriticalSectionAndSpinCount( &m_Crit, SpinCount))
20  SetCreated(true);
21  else
22  SetCreated(false);
23 
24  return IsCreated();
25  }
27  {
28  DeleteCriticalSection(&m_Crit);
29  SetCreated(false);
30  }
32  {
33  if(IsCreated()) EnterCriticalSection( &m_Crit );
34  }
36  {
37  if(IsCreated()) LeaveCriticalSection( &m_Crit );
38  }
39 }
virtual void Enter(void)
virtual void Leave(void)
virtual void SetCreated(bool crt)
Definition: IRASection.h:20
virtual bool IsCreated()
Definition: IRASection.h:18
virtual void Destroy(void)
virtual void Create(void)