source: trunk/src/win32k/kKrnlLib/include/OS2KSM.h

Last change on this file was 6837, checked in by bird, 24 years ago

Varible mappings. And some minor fixing.

File size: 3.5 KB
Line 
1/* $Id: OS2KSM.h,v 1.3 2001-09-27 03:04:12 bird Exp $
2 *
3 * OS/2 kernel swapper manager stuff.
4 *
5 * Copyright (c) 2001 knut st. osmundsen (knut.stange.osmundsen@mynd.no)
6 *
7 * Project Odin Software License can be found in LICENSE.TXT
8 *
9 */
10#ifndef _OS2KSM_H_
11#define _OS2KSM_H_
12
13/*******************************************************************************
14* Global Variables *
15*******************************************************************************/
16#ifndef KKRNLLIB
17 #if defined(__IBMC__) || defined(__IBMCPP__)
18 #pragma map(SMswapping , "_SMswapping")
19 #pragma map(smFileSize , "_smFileSize")
20 #pragma map(smcBrokenDF , "_smcBrokenDF")
21 #pragma map(SMcDFInuse , "_SMcDFInuse")
22 #pragma map(SMMinFree , "_SMMinFree")
23 #pragma map(SMCFGMinFree , "_SMCFGMinFree")
24 #pragma map(SMCFGSwapSize, "_SMCFGSwapSize")
25 #pragma map(smcGrowFails , "_smcGrowFails")
26 #pragma map(SMcInMemFile , "_SMcInMemFile")
27 #else
28 #pragma SMswapping _SMswapping
29 #pragma smFileSize _smFileSize
30 #pragma smcBrokenDF _smcBrokenDF
31 #pragma SMcDFInuse _SMcDFInuse
32 #pragma SMMinFree _SMMinFree
33 #pragma SMCFGMinFree _SMCFGMinFree
34 #pragma SMCFGSwapSize _SMCFGSwapSize
35 #pragma smcGrowFails _smcGrowFails
36 #pragma SMcInMemFile _SMcInMemFile
37 #endif
38#endif
39
40/**
41 * Swapping enabled flag.
42 * Two states:<ul>
43 * <li> 1 - Swapping enabled.
44 * <li> 0 - Swapping disabled. </ul>
45 */
46#ifdef KKRNLLIB
47extern PSHORT pSMswapping;
48#define SMswapping (*pSMswapping)
49#else
50extern SHORT SMswapping;
51#endif
52
53
54/**
55 * Real swapper file size in disk frames (ie. pages).
56 */
57#ifdef KKRNLLIB
58extern PULONG psmFileSize;
59#define smFileSize (*psmFileSize)
60#else
61extern ULONG smFileSize;
62#endif
63
64
65/**
66 * Number of broken disk frames.
67 */
68#ifdef KKRNLLIB
69extern PULONG psmcBrokenDF;
70#define smcBrokenDF (*psmcBrokenDF)
71#else
72extern ULONG smcBrokenDF;
73#endif
74
75
76/**
77 * Number of disk frames (DF) currently in use.
78 */
79#ifdef KKRNLLIB
80extern PULONG pSMcDFInuse;
81#define SMcDFInuse (*pSMcDFInuse)
82#else
83extern ULONG SMcDFInuse;
84#endif
85
86
87/**
88 * Number of available disk frames (DF) currently.
89 */
90#define SMcDFAvail (smFileSize - smcBrokenDF - SMcDFInuse)
91
92
93/**
94 * The minimum free space on the swap volume (in pages). (Addjusted SMCFGMinFree)
95 */
96#ifdef KKRNLLIB
97extern PULONG pSMMinFree;
98#define SMMinFree (*pSMMinFree)
99#else
100extern ULONG SMMinFree;
101#endif
102
103
104/**
105 * The minimum free space on the swap volumen (in pages * 4) specified in config.sys.
106 */
107#ifdef KKRNLLIB
108extern PULONG pSMCFGMinFree;
109#define SMCFGMinFree (*pSMCFGMinFree)
110#else
111extern ULONG SMCFGMinFree;
112#endif
113
114
115/**
116 * The initial swapfile size (in pages * 4) specified in config.sys.
117 */
118#ifdef KKRNLLIB
119extern PULONG pSMCFGSwapSize;
120#define SMCFGSwapSize (*pSMCFGSwapSize)
121#else
122extern ULONG SMCFGSwapSize;
123#endif
124
125
126/**
127 * Number of swapper grow attempt which has failed since boot.
128 */
129#ifdef KKRNLLIB
130extern PULONG psmcGrowFails;
131#define smcGrowFails (*psmcGrowFails)
132#else
133extern ULONG smcGrowFails;
134#endif
135
136
137/**
138 * Number of pages in a in memory swap file.
139 * This count isn't counted into the SMcDFInuse count I think.
140 */
141#ifdef KKRNLLIB
142extern PULONG pSMcInMemFile;
143#define SMcInMemFile (*pSMcInMemFile)
144#else
145extern ULONG SMcInMemFile;
146#endif
147
148
149#endif
Note: See TracBrowser for help on using the repository browser.