Changeset 8200 for trunk/include/vmutex.h
- Timestamp:
- Apr 7, 2002, 4:34:30 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/vmutex.h
r3208 r8200 1 /* $Id: vmutex.h,v 1. 5 2000-03-23 19:25:09sandervl Exp $ */1 /* $Id: vmutex.h,v 1.6 2002-04-07 14:34:30 sandervl Exp $ */ 2 2 3 3 /* … … 9 9 #define __VMUTEX_H__ 10 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 11 #include <odincrt.h> 20 12 21 13 class VMutex 22 14 { 23 15 public: 24 VMutex (int fShared = VMUTEX_NONSHARED, HMTX *phMutex = NULL);16 VMutex(); 25 17 ~VMutex(); 26 18 27 19 public: 28 VOID enter(ULONG timeout = VMUTEX_WAIT_FOREVER, HMTX *phMutex = NULL); 29 VOID leave(HMTX *phMutex = NULL); 30 int getNrBlocked() { return waiting; }; 20 VOID enter() { DosEnterCriticalSection(&critsect); }; 21 VOID leave() { DosLeaveCriticalSection(&critsect); }; 31 22 32 23 protected: 33 HMTX sem_handle; 34 int waiting; 35 BOOL fShared; 24 CRITICAL_SECTION_OS2 critsect; 36 25 }; 37 26
Note:
See TracChangeset
for help on using the changeset viewer.