Electroneum
epee::critical_section Class Reference

#include <syncobj.h>

Public Member Functions

 critical_section (const critical_section &section)
 
 critical_section ()
 
 ~critical_section ()
 
void lock ()
 
void unlock ()
 
bool tryLock ()
 
critical_sectionoperator= (const critical_section &section)
 
 critical_section (const critical_section &section)
 
 critical_section ()
 
 ~critical_section ()
 
void lock ()
 
void unlock ()
 
bool tryLock ()
 
critical_sectionoperator= (const critical_section &section)
 

Detailed Description

Definition at line 81 of file syncobj.h.

Constructor & Destructor Documentation

◆ critical_section() [1/4]

epee::critical_section::critical_section ( const critical_section section)
inline

Definition at line 87 of file syncobj.h.

88  {
89  }

◆ critical_section() [2/4]

epee::critical_section::critical_section ( )
inline

Definition at line 91 of file syncobj.h.

92  {
93  }

◆ ~critical_section() [1/2]

epee::critical_section::~critical_section ( )
inline

Definition at line 95 of file syncobj.h.

96  {
97  }

◆ critical_section() [3/4]

epee::critical_section::critical_section ( const critical_section section)
inline

Definition at line 43 of file winobj.h.

43  {
44  InitializeCriticalSection( &m_section );
45  }

◆ critical_section() [4/4]

epee::critical_section::critical_section ( )
inline

Definition at line 47 of file winobj.h.

47  {
48  InitializeCriticalSection( &m_section );
49  }

◆ ~critical_section() [2/2]

epee::critical_section::~critical_section ( )
inline

Definition at line 51 of file winobj.h.

51  {
52  DeleteCriticalSection( &m_section );
53  }

Member Function Documentation

◆ lock() [1/2]

void epee::critical_section::lock ( )
inline

Definition at line 55 of file winobj.h.

55  {
56  EnterCriticalSection( &m_section );
57  }

◆ lock() [2/2]

void epee::critical_section::lock ( )
inline

Definition at line 99 of file syncobj.h.

100  {
101  m_section.lock();
102  //EnterCriticalSection( &m_section );
103  }
Here is the caller graph for this function:

◆ operator=() [1/2]

critical_section& epee::critical_section::operator= ( const critical_section section)
inline

Definition at line 67 of file winobj.h.

68  {
69  return *this;
70  }

◆ operator=() [2/2]

critical_section& epee::critical_section::operator= ( const critical_section section)
inline

Definition at line 116 of file syncobj.h.

117  {
118  return *this;
119  }

◆ tryLock() [1/2]

bool epee::critical_section::tryLock ( )
inline

Definition at line 63 of file winobj.h.

63  {
64  return TryEnterCriticalSection( &m_section )? true:false;
65  }

◆ tryLock() [2/2]

bool epee::critical_section::tryLock ( )
inline

Definition at line 110 of file syncobj.h.

111  {
112  return m_section.try_lock();
113  }

◆ unlock() [1/2]

void epee::critical_section::unlock ( )
inline

Definition at line 59 of file winobj.h.

59  {
60  LeaveCriticalSection( &m_section );
61  }

◆ unlock() [2/2]

void epee::critical_section::unlock ( )
inline

Definition at line 105 of file syncobj.h.

106  {
107  m_section.unlock();
108  }
Here is the caller graph for this function:

The documentation for this class was generated from the following files: