Line | |
---|
1 | /* $Id: OS2Krnl.h,v 1.11 2001-02-11 15:11:34 bird Exp $
|
---|
2 | *
|
---|
3 | * OS/2 kernel structures, typedefs and macros.
|
---|
4 | *
|
---|
5 | * Top-level include file.
|
---|
6 | *
|
---|
7 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
8 | *
|
---|
9 | */
|
---|
10 |
|
---|
11 | #ifndef _OS2Krnl_h_
|
---|
12 | #define _OS2Krnl_h_
|
---|
13 |
|
---|
14 |
|
---|
15 |
|
---|
16 | /*
|
---|
17 | * "OS2KDefs.h"
|
---|
18 | */
|
---|
19 | #if !defined(OS2_INCLUDED)
|
---|
20 | /* when used with h2inc.exe */
|
---|
21 | #define UCHAR unsigned char
|
---|
22 | #define CHAR char
|
---|
23 | #define USHORT unsigned short
|
---|
24 | #define ULONG unsigned long
|
---|
25 | #define PCHAR char *
|
---|
26 | #endif
|
---|
27 |
|
---|
28 | #ifndef PAGESHIFT
|
---|
29 | #define PAGESHIFT 12 /* bytes to pages or pages to bytes shift value. */
|
---|
30 | #endif
|
---|
31 | #ifndef PAGESIZE
|
---|
32 | #define PAGESIZE 0x1000 /* pagesize on i386 */
|
---|
33 | #endif
|
---|
34 | #ifndef PAGEOFFSET
|
---|
35 | #define PAGEOFFSET(addr) ((addr) & (PAGESIZE-1)) /* Gets the offset into the page addr points into. */
|
---|
36 | #endif
|
---|
37 | #ifndef PAGESTART
|
---|
38 | #define PAGESTART(addr) ((addr) & ~(PAGESIZE-1)) /* Gets the address of the page addr points into. */
|
---|
39 | #endif
|
---|
40 |
|
---|
41 |
|
---|
42 | /*
|
---|
43 | * Handles
|
---|
44 | */
|
---|
45 | typedef USHORT HMTE, *PHMTE; /* Module Table Entry (MTE) handle */
|
---|
46 | typedef USHORT HPTDA, *PHPTDA; /* Per-Task Data Area (PTDA) handle */
|
---|
47 | #ifdef RING0
|
---|
48 | typedef USHORT SFN, *PSFN; /* System File Number (SFN) - ie. file handle. */
|
---|
49 | #else
|
---|
50 | #define SFN HFILE
|
---|
51 | #define PSFN PHFILE
|
---|
52 | #endif
|
---|
53 |
|
---|
54 |
|
---|
55 |
|
---|
56 |
|
---|
57 | /*
|
---|
58 | * Calling convention for 32-bit OS/2 Kernel functions.
|
---|
59 | */
|
---|
60 | #define KRNLCALL __stdcall
|
---|
61 |
|
---|
62 | /*
|
---|
63 | * Calling convention for Security Helpers.
|
---|
64 | */
|
---|
65 | #define SECCALL _System
|
---|
66 |
|
---|
67 | /*
|
---|
68 | *
|
---|
69 | * Other Kernel Parts
|
---|
70 | *
|
---|
71 | */
|
---|
72 | #ifdef INCL_OS2KRNL_ALL
|
---|
73 | #define INCL_OS2KRNL_IO
|
---|
74 | #define INCL_OS2KRNL_VM
|
---|
75 | #define INCL_OS2KRNL_SM
|
---|
76 | #define INCL_OS2KRNL_SEM
|
---|
77 | #define INCL_OS2KRNL_TK
|
---|
78 | #define INCL_OS2KRNL_PTDA
|
---|
79 | #define INCL_OS2KRNL_TCB
|
---|
80 | #define INCL_OS2KRNL_SEC
|
---|
81 | #define INCL_OS2KRNL_LDR
|
---|
82 | #endif
|
---|
83 |
|
---|
84 | #if defined(INCL_OS2KRNL_PTDA) && !defined(INCL_OS2KRNL_SEM)
|
---|
85 | #define INCL_OS2KRNL_SEM
|
---|
86 | #endif
|
---|
87 |
|
---|
88 | #ifdef INCL_OS2KRNL_IO
|
---|
89 | #include <OS2KIO.h>
|
---|
90 | #endif
|
---|
91 |
|
---|
92 | #ifdef INCL_OS2KRNL_VM
|
---|
93 | #include <OS2KVM.h>
|
---|
94 | #endif
|
---|
95 |
|
---|
96 | #ifdef INCL_OS2KRNL_PG
|
---|
97 | #include <OS2KPG.h>
|
---|
98 | #endif
|
---|
99 |
|
---|
100 | #ifdef INCL_OS2KRNL_SM
|
---|
101 | #include <OS2KSM.h>
|
---|
102 | #endif
|
---|
103 |
|
---|
104 | #ifdef INCL_OS2KRNL_SEM
|
---|
105 | #include <OS2KSEM.h>
|
---|
106 | #endif
|
---|
107 |
|
---|
108 | #ifdef INCL_OS2KRNL_PTDA
|
---|
109 | #include <OS2KPTDA.h>
|
---|
110 | #endif
|
---|
111 |
|
---|
112 | #ifdef INCL_OS2KRNL_TK
|
---|
113 | #include <OS2KTK.h>
|
---|
114 | #endif
|
---|
115 |
|
---|
116 | #ifdef INCL_OS2KRNL_TCB
|
---|
117 | #include <OS2KTCB.h>
|
---|
118 | #endif
|
---|
119 |
|
---|
120 | #ifdef INCL_OS2KRNL_LDR
|
---|
121 | #include <OS2KLDR.h>
|
---|
122 | #endif
|
---|
123 |
|
---|
124 | #ifdef INCL_OS2KRNL_SEC
|
---|
125 | #include <OS2KSEC.h>
|
---|
126 | #endif
|
---|
127 |
|
---|
128 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.