sl@0
|
1 |
//------------------------------------------------------------------------------
|
sl@0
|
2 |
#ifndef MUTEX_H_INCLUDED
|
sl@0
|
3 |
#define MUTEX_H_INCLUDED
|
sl@0
|
4 |
//------------------------------------------------------------------------------
|
sl@0
|
5 |
#include <windows.h>
|
sl@0
|
6 |
//------------------------------------------------------------------------------
|
sl@0
|
7 |
class Mutex
|
sl@0
|
8 |
{
|
sl@0
|
9 |
public:
|
sl@0
|
10 |
Mutex();
|
sl@0
|
11 |
virtual ~Mutex();
|
sl@0
|
12 |
|
sl@0
|
13 |
private:
|
sl@0
|
14 |
Mutex(const Mutex& other) {}
|
sl@0
|
15 |
Mutex& operator=(const Mutex& other) { return *this; }
|
sl@0
|
16 |
|
sl@0
|
17 |
public:
|
sl@0
|
18 |
void Request() const;
|
sl@0
|
19 |
void Release() const;
|
sl@0
|
20 |
|
sl@0
|
21 |
private:
|
sl@0
|
22 |
HANDLE m_hMutex;
|
sl@0
|
23 |
};
|
sl@0
|
24 |
//------------------------------------------------------------------------------
|
sl@0
|
25 |
#endif
|
sl@0
|
26 |
//------------------------------------------------------------------------------
|