Source code of Windows XP (NT5)
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.
 
 
 
 
 
 

25 lines
463 B

#ifndef __CRITSEC_H__
#define __CRITSEC_H__
//
// CRITSEC.H: Wrapper class for critical sections
//
//
class CCriticalSection
{
public:
// Constructor/Destructor
CCriticalSection() { InitializeCriticalSection(&m_CriticalSection); }
~CCriticalSection() { DeleteCriticalSection(&m_CriticalSection); }
protected:
CRITICAL_SECTION m_CriticalSection;
public:
inline operator CRITICAL_SECTION*() { return &m_CriticalSection; }
};
#endif