| 1 |  | 
|---|
| 2 | /* | 
|---|
| 3 | *@@sourcefile pmsems.h: | 
|---|
| 4 | *      header file declaring the format, the indices, and the names | 
|---|
| 5 | *      of the global fast mutex semaphores used by PM and GRE, | 
|---|
| 6 | *      according to the OS/2 debugging handbook. | 
|---|
| 7 | * | 
|---|
| 8 | *      Note: Version numbering in this file relates to XWorkplace version | 
|---|
| 9 | *            numbering. | 
|---|
| 10 | */ | 
|---|
| 11 |  | 
|---|
| 12 | /*      Copyright (C) 2002 Ulrich Mller. | 
|---|
| 13 | *      This file is part of the "XWorkplace helpers" source package. | 
|---|
| 14 | *      This is free software; you can redistribute it and/or modify | 
|---|
| 15 | *      it under the terms of the GNU General Public License as published | 
|---|
| 16 | *      by the Free Software Foundation, in version 2 as it comes in the | 
|---|
| 17 | *      "COPYING" file of the XWorkplace main distribution. | 
|---|
| 18 | *      This program is distributed in the hope that it will be useful, | 
|---|
| 19 | *      but WITHOUT ANY WARRANTY; without even the implied warranty of | 
|---|
| 20 | *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
|---|
| 21 | *      GNU General Public License for more details. | 
|---|
| 22 | * | 
|---|
| 23 | *@@include #include <os2.h> | 
|---|
| 24 | *@@include #include "helpers\pmsems.h" | 
|---|
| 25 | */ | 
|---|
| 26 |  | 
|---|
| 27 | #if __cplusplus | 
|---|
| 28 | extern "C" { | 
|---|
| 29 | #endif | 
|---|
| 30 |  | 
|---|
| 31 | #ifndef PMSEMS_HEADER_INCLUDED | 
|---|
| 32 | #define PMSEMS_HEADER_INCLUDED | 
|---|
| 33 |  | 
|---|
| 34 | #pragma pack(1) | 
|---|
| 35 |  | 
|---|
| 36 | /* | 
|---|
| 37 | *@@ PMSEM: | 
|---|
| 38 | *      PM semaphore definition, according to | 
|---|
| 39 | *      the OS/2 debugging handbook. | 
|---|
| 40 | * | 
|---|
| 41 | *@@added V1.0.0 (2002-08-12) [umoeller] | 
|---|
| 42 | */ | 
|---|
| 43 |  | 
|---|
| 44 | typedef struct _PMSEM | 
|---|
| 45 | { | 
|---|
| 46 | CHAR        szMagic[7]; | 
|---|
| 47 | BYTE        bSemaphore;         // 386 semaphore byte | 
|---|
| 48 | ULONG       ulOwnerPidTid; | 
|---|
| 49 | ULONG       cNesting;           // owner nested use count | 
|---|
| 50 | ULONG       cWaiters;           // number of waiters | 
|---|
| 51 | ULONG       ulDebug1;           // number of times sem used (debug only) | 
|---|
| 52 | HEV         hev;                // OS/2 event semaphore | 
|---|
| 53 | ULONG       ulDebug2;           // address of caller (debug only) | 
|---|
| 54 | } PMSEM, *PPMSEM; | 
|---|
| 55 |  | 
|---|
| 56 | #pragma pack() | 
|---|
| 57 |  | 
|---|
| 58 | #define PMSEM_ATOM          0 | 
|---|
| 59 | #define PMSEM_USER          1 | 
|---|
| 60 | #define PMSEM_VISLOCK       2 | 
|---|
| 61 | #define PMSEM_DEBUG         3 | 
|---|
| 62 | #define PMSEM_HOOK          4 | 
|---|
| 63 | #define PMSEM_HEAP          5 | 
|---|
| 64 | #define PMSEM_DLL           6 | 
|---|
| 65 | #define PMSEM_THUNK         7 | 
|---|
| 66 | #define PMSEM_XLCE          8 | 
|---|
| 67 | #define PMSEM_UPDATE        9 | 
|---|
| 68 | #define PMSEM_CLIP          10 | 
|---|
| 69 | #define PMSEM_INPUT         11 | 
|---|
| 70 | #define PMSEM_DESKTOP       12 | 
|---|
| 71 | #define PMSEM_HANDLE        13 | 
|---|
| 72 | #define PMSEM_ALARM         14 | 
|---|
| 73 | #define PMSEM_STRRES        15 | 
|---|
| 74 | #define PMSEM_TIMER         16 | 
|---|
| 75 | #define PMSEM_CONTROLS      17 | 
|---|
| 76 | #define GRESEM_GreInit      18 | 
|---|
| 77 | #define GRESEM_AutoHeap     19 | 
|---|
| 78 | #define GRESEM_PDEV         20 | 
|---|
| 79 | #define GRESEM_LDEV         21 | 
|---|
| 80 | #define GRESEM_CodePage     22 | 
|---|
| 81 | #define GRESEM_HFont        23 | 
|---|
| 82 | #define GRESEM_FontCntxt    24 | 
|---|
| 83 | #define GRESEM_FntDrvr      25 | 
|---|
| 84 | #define GRESEM_ShMalloc     26 | 
|---|
| 85 | #define GRESEM_GlobalData   27 | 
|---|
| 86 | #define GRESEM_DbcsEnv      28 | 
|---|
| 87 | #define GRESEM_SrvLock      29 | 
|---|
| 88 | #define GRESEM_SelLock      30 | 
|---|
| 89 | #define GRESEM_ProcLock     31 | 
|---|
| 90 | #define GRESEM_DriverSem    32 | 
|---|
| 91 | #define GRESEM_semIfiCache  33 | 
|---|
| 92 | #define GRESEM_semFontTable 34 | 
|---|
| 93 |  | 
|---|
| 94 | #define LASTSEM             34 | 
|---|
| 95 |  | 
|---|
| 96 | #ifndef __DEFINE_PMSEMS | 
|---|
| 97 | static const PCSZ G_papcszSems[] = | 
|---|
| 98 | #else | 
|---|
| 99 | static const PCSZ G_papcszSems[] = | 
|---|
| 100 | { | 
|---|
| 101 | "PMSEM_ATOM", // 0 | 
|---|
| 102 | "PMSEM_USER", // 1 | 
|---|
| 103 | "PMSEM_VISLOCK", // 2 | 
|---|
| 104 | "PMSEM_DEBUG", // 3 | 
|---|
| 105 | "PMSEM_HOOK", // 4 | 
|---|
| 106 | "PMSEM_HEAP", // 5 | 
|---|
| 107 | "PMSEM_DLL", // 6 | 
|---|
| 108 | "PMSEM_THUNK", // 7 | 
|---|
| 109 | "PMSEM_XLCE", // 8 | 
|---|
| 110 | "PMSEM_UPDATE", // 9 | 
|---|
| 111 | "PMSEM_CLIP", // 10 | 
|---|
| 112 | "PMSEM_INPUT", // 11 | 
|---|
| 113 | "PMSEM_DESKTOP", // 12 | 
|---|
| 114 | "PMSEM_HANDLE", // 13 | 
|---|
| 115 | "PMSEM_ALARM", // 14 | 
|---|
| 116 | "PMSEM_STRRES", // 15 | 
|---|
| 117 | "PMSEM_TIMER", // 16 | 
|---|
| 118 | "PMSEM_CONTROLS", // 17 | 
|---|
| 119 | "GRESEM_GreInit", // 18 | 
|---|
| 120 | "GRESEM_AutoHeap", // 19 | 
|---|
| 121 | "GRESEM_PDEV", // 20 | 
|---|
| 122 | "GRESEM_LDEV", // 21 | 
|---|
| 123 | "GRESEM_CodePage", // 22 | 
|---|
| 124 | "GRESEM_HFont", // 23 | 
|---|
| 125 | "GRESEM_FontCntxt", // 24 | 
|---|
| 126 | "GRESEM_FntDrvr", // 25 | 
|---|
| 127 | "GRESEM_ShMalloc", // 26 | 
|---|
| 128 | "GRESEM_GlobalData", // 27 | 
|---|
| 129 | "GRESEM_DbcsEnv", // 28 | 
|---|
| 130 | "GRESEM_SrvLock", // 29 | 
|---|
| 131 | "GRESEM_SelLock", // 30 | 
|---|
| 132 | "GRESEM_ProcLock", // 31 | 
|---|
| 133 | "GRESEM_DriverSem", // 32 | 
|---|
| 134 | "GRESEM_semIfiCache", // 33 | 
|---|
| 135 | "GRESEM_semFontTable", // 34 | 
|---|
| 136 | }; | 
|---|
| 137 |  | 
|---|
| 138 | #endif      // #ifndef __DEFINE_PMSEMS | 
|---|
| 139 |  | 
|---|
| 140 | #endif | 
|---|
| 141 |  | 
|---|
| 142 | #if __cplusplus | 
|---|
| 143 | } | 
|---|
| 144 | #endif | 
|---|
| 145 |  | 
|---|