source: trunk/src/win32k/include/OS2KSEM.h@ 3829

Last change on this file since 3829 was 3829, checked in by bird, 25 years ago

Early development.

File size: 2.4 KB
Line 
1/* $Id: OS2KSEM.h,v 1.1 2000-07-16 22:21:19 bird Exp $
2 *
3 * OS/2 kernel Semaphore functions.
4 *
5 * Copyright (c) 2000 knut st. osmundsen (knut.stange.osmundsen@pmsc.no)
6 *
7 * Project Odin Software License can be found in LICENSE.TXT
8 *
9 */
10
11
12#ifndef _OS2KSEM_h_
13#define _OS2KSEM_h_
14
15/*******************************************************************************
16* Defined Constants And Macros *
17*******************************************************************************/
18#define KSEM_INDEFINITE_WAIT -1L
19#define KSEM_IMMEDIATE_RETURN 0L
20
21
22/*******************************************************************************
23* Structures and Typedefs *
24*******************************************************************************/
25typedef ULONG HKSEM; /* Handle to kernel semaphore. */
26typedef HKSEM PHKSEM; /* Pointer to kernel semaphore handle. */
27typedef HKSEM HKMTX; /* Handle to kernel mutex semaphore. */
28typedef HKSEM HKEV; /* Handle to kernel event semaphore. */
29
30
31/*******************************************************************************
32* Exported Functions *
33*******************************************************************************/
34/*
35 * Mutex semaphores.
36 * NOTE! Only is KSEMRequestMutex currently is imported!
37 */
38extern ULONG KRNLCALL KSEMRequestMutex(HKMTX hkmtx, ULONG ulTimeout);
39extern VOID KRNLCALL KSEMReleaseMutex(HKMTX hkmtx);
40extern ULONG KRNLCALL KSEMQueryMutex(HKMTX hkmtx, PUSHORT pus);
41
42
43#if 0
44/*
45 * Event semaphores.
46 */
47extern VOID KRNLCALL KSEMResetEvent(HKEV hkevent);
48extern VOID KRNLCALL KSEMPostEvent(HKEV hkevent);
49extern ULONG KRNLCALL KSEMWaitEvent(HKEV hkevent);
50
51/*
52 * Some other KSEM prefixed functions - parameters's not that obvious...
53 */
54extern ULONG KRNLCALL KSEMAlloc(PHKSEM phksem, ULONG p1, ULONG p2);
55extern ULONG KRNLCALL KSEMCreate(PHKSEM phksem, ULONG type);
56extern ULONG KRNLCALL KSEMRequestExclusive(HKSEM hksem, ULONG );
57extern ULONG KRNLCALL KSEMRequestShared(HKSEM hksem, ULONG);
58extern VOID KRNLCALL KSEMDestroy(HKSEM hksem);
59extern VOID KRNLCALL KSEMInit(HKSEM hksem, ULONG p1, ULONG p2);
60extern VOID KRNLCALL KSEMQuery(HKSEM hksem, ULONG p2)
61extern VOID KRNLCALL KSEMRelease(HKSEM hksem);
62#endif
63#endif
64
Note: See TracBrowser for help on using the repository browser.