source: trunk/src/kernel32/hmsemaphore.h@ 6049

Last change on this file since 6049 was 6049, checked in by sandervl, 24 years ago

semaphore rewrite (not activated)

File size: 2.8 KB
Line 
1/* $Id: hmsemaphore.h,v 1.3 2001-06-19 10:50:25 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#ifdef USE_OS2SEMAPHORES
32class HMDeviceSemaphoreClass : public HMDeviceHandler
33#else
34class HMDeviceSemaphoreClass : public HMDeviceOpen32Class
35#endif
36{
37public:
38 HMDeviceSemaphoreClass(LPCSTR lpDeviceName) : HMDeviceOpen32Class(lpDeviceName) {}
39
40 /* this is a handler method for calls to CreateSemaphore() */
41 virtual DWORD CreateSemaphore (PHMHANDLEDATA pHMHandleData,
42 LPSECURITY_ATTRIBUTES lpsa,
43 LONG lInitialCount,
44 LONG lMaximumCount,
45 LPCTSTR lpszSemaphoreName);
46
47 /* this is a handler method for calls to OpenSemaphore() */
48 virtual DWORD OpenSemaphore (PHMHANDLEDATA pHMHandleData,
49 BOOL fInheritHandle,
50 LPCTSTR lpszSemaphoreName);
51
52#ifdef USE_OS2SEMAPHORES
53 virtual BOOL CloseHandle(PHMHANDLEDATA pHMHandleData);
54
55 virtual BOOL DuplicateHandle(PHMHANDLEDATA pHMHandleData, HANDLE srcprocess,
56 PHMHANDLEDATA pHMSrcHandle,
57 HANDLE destprocess,
58 PHANDLE desthandle,
59 DWORD fdwAccess,
60 BOOL fInherit,
61 DWORD fdwOptions,
62 DWORD fdwOdinOptions);
63#endif
64
65 /* this is a handle method for calls to ReleaseSemaphore() */
66 virtual BOOL ReleaseSemaphore(PHMHANDLEDATA pHMHandleData,
67 LONG cReleaseCount,
68 LPLONG lpPreviousCount);
69};
70
71
72#endif /* _HM_DEVICE_SEMAPHORE_H_ */
73
Note: See TracBrowser for help on using the repository browser.