source: trunk/include/vmutex.h@ 10

Last change on this file since 10 was 10, checked in by phaller, 26 years ago

Experimental support vor EMX/GCC 0.9d as build environment. IBM VAC++ 3 remains default. (SET CCENV=VAC3 or EMX)

File size: 511 bytes
RevLine 
[10]1/* $Id: vmutex.h,v 1.2 1999-05-27 15:17:59 phaller Exp $ */
[4]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
18class VMutex
19{
20public:
21 VMutex (void);
22 ~VMutex();
23
24public:
25 VOID enter(ULONG timeout = VMUTEX_WAIT_FOREVER);
26 VOID leave();
27 int getNrBlocked() { return waiting; };
28
29protected:
30 HMTX sem_handle;
31 int waiting;
32};
33
34#endif
Note: See TracBrowser for help on using the repository browser.