source: trunk/include/vsemaphore.h@ 5200

Last change on this file since 5200 was 3208, checked in by sandervl, 25 years ago

mutex + semaphore header updates

File size: 712 bytes
Line 
1/* $Id: vsemaphore.h,v 1.1 2000-03-23 19:25:10 sandervl Exp $ */
2
3/*
4 *
5 * Project Odin Software License can be found in LICENSE.TXT
6 *
7 */
8#ifndef __VSEMAPHORE_H__
9#define __VSEMAPHORE_H__
10
11#define VSEMAPHORE_RETURN_IMM 0
12#define VSEMAPHORE_WAIT_FOREVER -1
13
14#define VSEMAPHORE_NONSHARED 0
15#define VSEMAPHORE_SHARED 1
16
17#ifdef _OS2WIN_H
18#define HEV DWORD
19#endif
20
21class VSemaphore
22{
23public:
24 VSemaphore (int fShared = VSEMAPHORE_NONSHARED, HEV *phSem = NULL);
25 ~VSemaphore();
26
27public:
28 VOID wait(ULONG timeout = VSEMAPHORE_WAIT_FOREVER, HEV *phSem = NULL);
29 VOID post(HEV *phSem = NULL);
30 VOID reset(HEV *phSem = NULL);
31
32protected:
33 HEV sem_handle;
34 BOOL fShared;
35};
36
37#endif //__VSEMAPHORE_H__
Note: See TracBrowser for help on using the repository browser.