Line | |
---|
1 | /* $Id: vmutex.h,v 1.3 1999-08-28 19:34:26 sandervl Exp $ */
|
---|
2 |
|
---|
3 | /*
|
---|
4 | *
|
---|
5 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
6 | *
|
---|
7 | */
|
---|
8 | #ifndef __VMUTEX_H__
|
---|
9 | #define __VMUTEX_H__
|
---|
10 |
|
---|
11 | #define VMUTEX_RETURN_IMM 0
|
---|
12 | #define VMUTEX_WAIT_FOREVER -1
|
---|
13 |
|
---|
14 | #ifdef _OS2WIN_H
|
---|
15 | #define HMTX DWORD
|
---|
16 | #endif
|
---|
17 |
|
---|
18 | class VMutex
|
---|
19 | {
|
---|
20 | public:
|
---|
21 | VMutex (int fShared = FALSE);
|
---|
22 | ~VMutex();
|
---|
23 |
|
---|
24 | public:
|
---|
25 | VOID enter(ULONG timeout = VMUTEX_WAIT_FOREVER);
|
---|
26 | VOID leave();
|
---|
27 | int getNrBlocked() { return waiting; };
|
---|
28 |
|
---|
29 | protected:
|
---|
30 | HMTX sem_handle;
|
---|
31 | int waiting;
|
---|
32 | };
|
---|
33 |
|
---|
34 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.