blob: 54aad2723b8b137e41ae94d5c2ad1e7d0838a035 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#ifndef _PFC_CRITSEC_H_
#define _PFC_CRITSEC_H_
class critical_section : public CRITICAL_SECTION
{
public:
inline void enter() {EnterCriticalSection(this);}
inline void leave() {LeaveCriticalSection(this);}
critical_section() {InitializeCriticalSection(this);}
~critical_section() {DeleteCriticalSection(this);}
//BOOL TryEnter() {return TryEnterCriticalSection(this);}
};
#endif
|