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

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

Varible mappings. And some minor fixing.

File size: 4.4 KB
Line 
1/* $Id: OS2KPG.h,v 1.3 2001-09-27 03:04:12 bird Exp $
2 *
3 * OS/2 kernel page 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 _OS2KPG_H_
11#define _OS2KPG_H_
12
13/*******************************************************************************
14* Global Variables *
15*******************************************************************************/
16#ifndef KKRNLLIB
17 #if defined(__IBMC__) || defined(__IBMCPP__)
18 #pragma map(PGSwapEnabled , "_PGSwapEnabled")
19 #pragma map(pgPhysPages , "_pgPhysPages")
20 #pragma map(pgPhysMax , "_pgPhysMax")
21 #pragma map(pgResidentPages , "_pgResidentPages")
22 #pragma map(pgSwappablePages , "_pgSwappablePages")
23 #pragma map(pgDiscardableInmem , "_pgDiscardableInmem")
24 #pragma map(pgDiscardablePages , "_pgDiscardablePages")
25 #pragma map(pgcPageFaults , "_pgcPageFaults")
26 #pragma map(pgcPageFaultsActive , "_pgcPageFaultsActive")
27 #else
28 #pragma PGSwapEnabled _PGSwapEnabled
29 #pragma pgPhysPages _pgPhysPages
30 #pragma pgPhysMax _pgPhysMax
31 #pragma pgResidentPages _pgResidentPages
32 #pragma pgSwappablePages _pgSwappablePages
33 #pragma pgDiscardableInmem _pgDiscardableInmem
34 #pragma pgDiscardablePages _pgDiscardablePages
35 #pragma pgcPageFaults _pgcPageFaults
36 #pragma pgcPageFaultsActive _pgcPageFaultsActive
37 #endif
38#endif
39
40/**
41 * Paging enabled flag.
42 * Two states:<ul>
43 * <li> 1 - Swapping enabled.
44 * <li> 0 - Swapping disabled. </ul>
45 */
46#ifdef KKRNLLIB
47extern int * pPGSwapEnabled;
48#define PGSwapEnabled (*pPGSwapEnabled)
49#else
50extern int PGSwapEnabled;
51#endif
52
53
54/**
55 * Count of physical pages - hope this is correct.
56 */
57#ifdef KKRNLLIB
58extern int * ppgPhysPages;
59#define pgPhysPages (*ppgPhysPages)
60#else
61extern int pgPhysPages;
62#endif
63
64
65/**
66 * Pointer to top of physical memory (physical address).
67 */
68#ifdef KKRNLLIB
69extern PULONG ppgPhysMax;
70#define pgPhysMax (*ppgPhysMax)
71#else
72extern ULONG pgPhysMax;
73#endif
74
75
76/**
77 * Count of resident pages.
78 */
79#ifdef KKRNLLIB
80extern int * ppgResidentPages;
81#define pgResidentPages (*ppgResidentPages)
82#else
83extern int pgResidentPages;
84#endif
85
86
87/**
88 * Count of swappable pages which is currently present in memory.
89 */
90#ifdef KKRNLLIB
91extern int * ppgSwappablePages;
92#define pgSwappablePages (*ppgSwappablePages)
93#else
94extern int pgSwappablePages;
95#endif
96
97
98/**
99* Count of discardable pages which is currently present in memory.
100*/
101#ifdef KKRNLLIB
102extern int * ppgDiscardableInmem;
103#define pgDiscardableInmem (*ppgDiscardableInmem)
104#else
105extern int pgDiscardableInmem;
106#endif
107
108
109/**
110 * Count of discardable pages allocated.
111 */
112#ifdef KKRNLLIB
113extern int * ppgDiscardablePages;
114#define pgDiscardablePages (*ppgDiscardablePages)
115#else
116extern int pgDiscardablePages;
117#endif
118
119
120/**
121 * Count of page faults since bootup.
122 */
123#ifdef KKRNLLIB
124extern PULONG ppgcPageFaults;
125#define pgcPageFaults (*ppgcPageFaults)
126#else
127extern ULONG pgcPageFaults;
128#endif
129
130
131/**
132 * Count of page faults currently being processed.
133 */
134#ifdef KKRNLLIB
135extern PULONG ppgcPageFaultsActive;
136#define pgcPageFaultsActive (*ppgcPageFaultsActive)
137#else
138extern ULONG pgcPageFaultsActive;
139#endif
140
141
142/**
143 * Returns the number of bytes of physical memory available.
144 */
145ULONG KRNLCALL PGPhysAvail(void);
146ULONG KRNLCALL OrgPGPhysAvail(void);
147
148
149/**
150 * Returns the number of pageframes currently in use.
151 */
152ULONG KRNLCALL PGPhysPresent(void);
153ULONG KRNLCALL OrgPGPhysPresent(void);
154
155
156/**
157 * This function returns a bit vector for the dirty pages of a specified context
158 * for a specified range of pages.
159 *
160 * The dirty bits for the range are reset.
161 *
162 * @returns OS/2 return code. (NO_ERROR on success)
163 * @param ulVirtualPageNo Virtual page fram number.
164 * @param pPTDA Pointer to the context.
165 * @param cPages Number of pages. (max 32-bit due to ulDirtyBits.)
166 * @param ulDirtyBits Dirty bits.
167 * @remark VDM function... Not imported any longer.
168 */
169/*ULONG KRNLCALL PGGetDirty(ULONG ulVirtualPageNo, PPTDA pPTDA, ULONG cPages, PULONG ulDirtyBits);*/
170/*ULONG KRNLCALL OrgPGGetDirty(ULONG ulVirtualPageNo, PPTDA pPTDA, ULONG cPages, PULONG ulDirtyBits);*/
171
172
173#endif
174
Note: See TracBrowser for help on using the repository browser.