1 | /* $Id: hmsemaphore.h,v 1.6 2003-02-04 11:29:00 sandervl Exp $ */
|
---|
2 |
|
---|
3 | /*
|
---|
4 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
5 | * Win32 Unified Handle Manager for OS/2
|
---|
6 | * 1999/06/17 PH Patrick Haller (phaller@gmx.net)
|
---|
7 | */
|
---|
8 |
|
---|
9 | #ifndef _HM_DEVICE_SEMAPHORE_H_
|
---|
10 | #define _HM_DEVICE_SEMAPHORE_H_
|
---|
11 |
|
---|
12 |
|
---|
13 | /*****************************************************************************
|
---|
14 | * Remark *
|
---|
15 | *****************************************************************************
|
---|
16 | */
|
---|
17 |
|
---|
18 |
|
---|
19 | /*****************************************************************************
|
---|
20 | * Includes *
|
---|
21 | *****************************************************************************/
|
---|
22 |
|
---|
23 | #include "HMDevice.h"
|
---|
24 | #include "HMOpen32.h"
|
---|
25 |
|
---|
26 |
|
---|
27 | /*****************************************************************************
|
---|
28 | * Structures *
|
---|
29 | *****************************************************************************/
|
---|
30 |
|
---|
31 | class HMDeviceSemaphoreClass : public HMDeviceOpen32Class
|
---|
32 | {
|
---|
33 | public:
|
---|
34 | HMDeviceSemaphoreClass(LPCSTR lpDeviceName) : HMDeviceOpen32Class(lpDeviceName) {}
|
---|
35 |
|
---|
36 | /* this is a handler method for calls to CreateSemaphore() */
|
---|
37 | virtual DWORD CreateSemaphore (PHMHANDLEDATA pHMHandleData,
|
---|
38 | LPSECURITY_ATTRIBUTES lpsa,
|
---|
39 | LONG lInitialCount,
|
---|
40 | LONG lMaximumCount,
|
---|
41 | LPCTSTR lpszSemaphoreName);
|
---|
42 |
|
---|
43 | /* this is a handler method for calls to OpenSemaphore() */
|
---|
44 | virtual DWORD OpenSemaphore (PHMHANDLEDATA pHMHandleData,
|
---|
45 | BOOL fInheritHandle,
|
---|
46 | LPCTSTR lpszSemaphoreName);
|
---|
47 |
|
---|
48 | /* this is a handle method for calls to ReleaseSemaphore() */
|
---|
49 | virtual BOOL ReleaseSemaphore(PHMHANDLEDATA pHMHandleData,
|
---|
50 | LONG cReleaseCount,
|
---|
51 | LPLONG lpPreviousCount);
|
---|
52 | };
|
---|
53 |
|
---|
54 |
|
---|
55 | DWORD HMSemWaitForMultipleObjects (DWORD cObjects,
|
---|
56 | PHANDLE lphObjects,
|
---|
57 | BOOL fWaitAll,
|
---|
58 | DWORD dwTimeout);
|
---|
59 |
|
---|
60 | DWORD HMSemMsgWaitForMultipleObjects (DWORD cObjects,
|
---|
61 | PHANDLE lphObjects,
|
---|
62 | BOOL fWaitAll,
|
---|
63 | DWORD dwTimeout,
|
---|
64 | DWORD dwWakeMask);
|
---|
65 |
|
---|
66 |
|
---|
67 | #endif /* _HM_DEVICE_SEMAPHORE_H_ */
|
---|
68 |
|
---|