Changeset 4164 for trunk/src/win32k/include/OS2KSEM.h
- Timestamp:
- Sep 2, 2000, 11:08:23 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/win32k/include/OS2KSEM.h
r3829 r4164 1 /* $Id: OS2KSEM.h,v 1. 1 2000-07-16 22:21:19 bird Exp $1 /* $Id: OS2KSEM.h,v 1.2 2000-09-02 21:07:59 bird Exp $ 2 2 * 3 3 * OS/2 kernel Semaphore functions. … … 16 16 * Defined Constants And Macros * 17 17 *******************************************************************************/ 18 #define KSEM_INDEFINITE_WAIT -1L 19 #define KSEM_IMMEDIATE_RETURN 0L 18 #define KSEM_INDEFINITE_WAIT -1UL 19 #define KSEM_IMMEDIATE_RETURN 0UL 20 21 /* 22 * Semaphore type. ( Used with the generic KSEM routines. ) 23 */ 24 #define KSEM_EVENT 0 25 #define KSEM_MUTEX 1 26 #define KSEM_SHARED 2 27 28 /* 29 * Sempahore flags. (according to SG24-4640-00) 30 */ 31 #define KSEM_DEFAULT 0 32 #define KSEM_NOINTERRUPT 1 33 #define KSEM_WRITE 2 34 #define KSEM_DISPLAYID 4 35 #define KSEM_NOBLOCKED 8 20 36 21 37 … … 23 39 * Structures and Typedefs * 24 40 *******************************************************************************/ 25 typedef ULONG HKSEM; /* Handle to kernel semaphore. */ 26 typedef HKSEM PHKSEM; /* Pointer to kernel semaphore handle. */ 27 typedef HKSEM HKMTX; /* Handle to kernel mutex semaphore. */ 28 typedef HKSEM HKEV; /* Handle to kernel event semaphore. */ 41 /* (This is according to SG24-4640-00.) */ 42 43 typedef struct _KSEMSHR 44 { 45 /** 46 * Astrict 16 is byte while retail 12 is bytes. 47 * We'll reserve 20 bytes just to be sure!. 48 */ 49 char achDummy[20]; 50 51 struct 52 { 53 char ks_achSignature[4]; 54 char ks_bFlags; 55 char ks_bType; 56 unsigned short ks_Owner; 57 unsigned short ks_cusPendingWriters; 58 unsigned short ks_cusNest; 59 unsigned short ks_cusReaders; 60 unsigned short ks_cusPendingReaders; 61 } debug; 62 63 struct 64 { 65 char ks_bFlags; 66 char ks_bType; 67 unsigned short ks_Owner; 68 unsigned short ks_cusPendingWriters; 69 unsigned short ks_cusNest; 70 unsigned short ks_cusReaders; 71 unsigned short ks_cusPendingReaders; 72 } release; 73 74 } KSEMSHR, 75 *PKSEMSHR, 76 *HKSEMSHR; /* Handle to kernel shared semphore. */ 77 typedef HKSEMSHR * PHKSEMSHR; 78 79 80 typedef union _KSEMMTX 81 { 82 /** 83 * Astrict is 12 byte while retail is 8 bytes. 84 * We'll reserve 20 bytes just to be sure! 85 */ 86 char achDummy[20]; 87 88 struct 89 { 90 char ksem_achSignature[4]; 91 char ksem_bFlags; 92 char ksem_bType; 93 unsigned short ksem_Owner; 94 unsigned short ksem_cusPendingWriters; 95 unsigned short ksem_cusNest; 96 }debug; 97 struct 98 { 99 char ksem_bFlags; 100 char ksem_bType; 101 unsigned short ksem_Owner; 102 unsigned short ksem_cusPendingWriters; 103 unsigned short ksem_cusNest; 104 } release; 105 } KSEMMTX, 106 *PKSEMMTX, 107 *HKSEMMTX; /* Handle to kernel mutex semaphore. */ 108 typedef HKSEMMTX * PHKSEMMTX; 109 110 111 typedef struct _KSEMEVT 112 { 113 /** 114 * Astrict is 16 byte while retail is 12 bytes. 115 * We'll reserve 20 bytes just to be sure! 116 */ 117 char achDummy[20]; 118 119 struct 120 { 121 char kse_achSignature[4]; 122 char kse_bFlags; 123 char kse_bType; 124 unsigned short kse_Owner; 125 unsigned short kse_cusPendingWriters; 126 } debug; 127 128 struct 129 { 130 char kse_bFlags; 131 char kse_bType; 132 unsigned short kse_Owner; 133 unsigned short kse_cusPendingWriters; 134 } release; 135 136 } KSEMEVT, 137 *PKSEMEVT, 138 *HKSEMEVT; /* Handle to kernel event sempahore. */ 139 typedef HKSEMEVT * PHKSEMEVT; 140 141 142 typedef union _KSEM 143 { 144 KSEMSHR shr; 145 KSEMMTX mtx; 146 KSEMEVT evt; 147 } KSEM, *PKSEM, *HKSEM; /* Generic kernel semaphore handle. */ 148 typedef HKSEM * PHKSEM; 29 149 30 150 … … 34 154 /* 35 155 * Mutex semaphores. 36 * NOTE! Only is KSEMRequestMutex currently is imported!37 156 */ 38 extern ULONG KRNLCALL KSEMRequestMutex(HK MTX hkmtx, ULONG ulTimeout);39 extern VOID KRNLCALL KSEMReleaseMutex(HK MTX hkmtx);40 extern ULONG KRNLCALL KSEMQueryMutex(HK MTX hkmtx, PUSHORT pus);157 extern ULONG KRNLCALL KSEMRequestMutex(HKSEMMTX hkmtx, ULONG ulTimeout); 158 extern VOID KRNLCALL KSEMReleaseMutex(HKSEMMTX hkmtx); 159 extern ULONG KRNLCALL KSEMQueryMutex(HKSEMMTX hkmtx, PUSHORT pcusNest); 41 160 42 161 … … 48 167 extern VOID KRNLCALL KSEMPostEvent(HKEV hkevent); 49 168 extern ULONG KRNLCALL KSEMWaitEvent(HKEV hkevent); 169 #endif 50 170 51 171 /* 52 172 * Some other KSEM prefixed functions - parameters's not that obvious... 53 173 */ 174 #if 0 54 175 extern ULONG KRNLCALL KSEMAlloc(PHKSEM phksem, ULONG p1, ULONG p2); 55 176 extern ULONG KRNLCALL KSEMCreate(PHKSEM phksem, ULONG type); … … 57 178 extern ULONG KRNLCALL KSEMRequestShared(HKSEM hksem, ULONG); 58 179 extern VOID KRNLCALL KSEMDestroy(HKSEM hksem); 59 extern VOID KRNLCALL KSEMInit(HKSEM hksem, ULONG p1, ULONG p2); 180 #endif 181 extern VOID KRNLCALL KSEMInit(PKSEM pksem, ULONG fulType, ULONG fulFlags); 182 #if 0 60 183 extern VOID KRNLCALL KSEMQuery(HKSEM hksem, ULONG p2) 61 184 extern VOID KRNLCALL KSEMRelease(HKSEM hksem);
Note:
See TracChangeset
for help on using the changeset viewer.