source: trunk/include/vmutex.h@ 1430

Last change on this file since 1430 was 1430, checked in by sandervl, 26 years ago

* empty log message *

File size: 600 bytes
Line 
1/* $Id: vmutex.h,v 1.4 1999-10-24 22:48:17 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#define VMUTEX_NONSHARED 0
15#define VMUTEX_SHARED 1
16
17#ifdef _OS2WIN_H
18#define HMTX DWORD
19#endif
20
21class VMutex
22{
23public:
24 VMutex (int fShared = VMUTEX_NONSHARED);
25 ~VMutex();
26
27public:
28 VOID enter(ULONG timeout = VMUTEX_WAIT_FOREVER);
29 VOID leave();
30 int getNrBlocked() { return waiting; };
31
32protected:
33 HMTX sem_handle;
34 int waiting;
35};
36
37#endif
Note: See TracBrowser for help on using the repository browser.