Changeset 14 for trunk/include/helpers/dosh.h
- Timestamp:
- Dec 9, 2000, 8:19:42 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/helpers/dosh.h
r7 r14 17 17 /* This file Copyright (C) 1997-2000 Ulrich Mller, 18 18 * Dmitry A. Steklenev. 19 * This file is part of the XWorkplacesource package.20 * XWorkplaceis free software; you can redistribute it and/or modify19 * This file is part of the "XWorkplace helpers" source package. 20 * This is free software; you can redistribute it and/or modify 21 21 * it under the terms of the GNU General Public License as published 22 22 * by the Free Software Foundation, in version 2 as it comes in the … … 36 36 37 37 /* ****************************************************************** 38 * *39 * Miscellaneous *40 * *38 * 39 * Miscellaneous 40 * 41 41 ********************************************************************/ 42 42 … … 47 47 BOOL doshIsWarp4(VOID); 48 48 49 APIRET doshQueryAvailPhysMem(PULONG pulMem, 50 ULONG ulLogicalSwapDrive); 51 49 52 PSZ doshQuerySysErrorMsg(APIRET arc); 50 53 51 54 /* ****************************************************************** 52 * *53 * Memory helpers *54 * *55 * 56 * Memory helpers 57 * 55 58 ********************************************************************/ 56 59 … … 61 64 62 65 /* ****************************************************************** 63 * *64 * Drive helpers *65 * *66 * 67 * Drive helpers 68 * 66 69 ********************************************************************/ 67 70 … … 74 77 APIRET doshAssertDrive(ULONG ulLogicalDrive); 75 78 76 double doshQueryDiskFree(ULONG ulLogicalDrive); 79 APIRET doshSetLogicalMap(ULONG ulLogicalDrive); 80 81 APIRET doshQueryDiskFree(ULONG ulLogicalDrive, 82 double *pdFree); 77 83 78 84 APIRET doshQueryDiskFSType(ULONG ulLogicalDrive, … … 174 180 175 181 /* ****************************************************************** 176 * *177 * File helpers *178 * *182 * 183 * File helpers 184 * 179 185 ********************************************************************/ 180 186 … … 213 219 214 220 /* ****************************************************************** 215 * *216 * Directory helpers *217 * *221 * 222 * Directory helpers 223 * 218 224 ********************************************************************/ 219 225 … … 236 242 237 243 /* ****************************************************************** 238 * * 239 * Process helpers * 240 * * 244 * 245 * Performance Counters (CPU Load) 246 * 247 ********************************************************************/ 248 249 #define CMD_PERF_INFO 0x41 250 #define CMD_KI_ENABLE 0x60 251 #define CMD_KI_DISABLE 0x61 252 #ifndef CMD_KI_RDCNT 253 #define CMD_KI_RDCNT 0x63 254 typedef APIRET APIENTRY FNDOSPERFSYSCALL(ULONG ulCommand, 255 ULONG ulParm1, 256 ULONG ulParm2, 257 ULONG ulParm3); 258 typedef FNDOSPERFSYSCALL *PFNDOSPERFSYSCALL; 259 #endif 260 261 typedef struct _CPUUTIL 262 { 263 ULONG ulTimeLow; // low 32 bits of time stamp 264 ULONG ulTimeHigh; // high 32 bits of time stamp 265 ULONG ulIdleLow; // low 32 bits of idle time 266 ULONG ulIdleHigh; // high 32 bits of idle time 267 ULONG ulBusyLow; // low 32 bits of busy time 268 ULONG ulBusyHigh; // high 32 bits of busy time 269 ULONG ulIntrLow; // low 32 bits of interrupt time 270 ULONG ulIntrHigh; // high 32 bits of interrupt time 271 } CPUUTIL, *PCPUUTIL; 272 273 // macro to convert 8-byte (low, high) time value to double 274 #define LL2F(high, low) (4294967296.0*(high)+(low)) 275 276 /* 277 *@@ DOSHPERFSYS: 278 * structure used with doshPerfOpen. 279 * 280 *@@added V0.9.7 (2000-12-02) [umoeller] 281 */ 282 283 typedef struct _DOSHPERFSYS 284 { 285 // output: no. of processors on the system 286 ULONG cProcessors; 287 // output: one CPU load for each CPU 288 PLONG palLoads; 289 290 // each of the following ptrs points to an array of cProcessors items 291 PCPUUTIL paCPUUtils; // CPUUTIL structures 292 double *padBusyPrev; // previous "busy" calculations 293 double *padTimePrev; // previous "time" calculations 294 295 // private stuff 296 HMODULE hmod; 297 BOOL fInitialized; 298 PFNDOSPERFSYSCALL pDosPerfSysCall; 299 } DOSHPERFSYS, *PDOSHPERFSYS; 300 301 APIRET doshPerfOpen(PDOSHPERFSYS *ppPerfSys); 302 303 APIRET doshPerfGet(PDOSHPERFSYS pPerfSys); 304 305 APIRET doshPerfClose(PDOSHPERFSYS *ppPerfSys); 306 307 /* ****************************************************************** 308 * 309 * Process helpers 310 * 241 311 ********************************************************************/ 242 312 … … 253 323 254 324 /* ****************************************************************** 255 * *256 * Environment helpers *257 * *325 * 326 * Environment helpers 327 * 258 328 ********************************************************************/ 259 329 … … 291 361 292 362 /* ****************************************************************** 293 * *294 * Module handling helpers *295 * *363 * 364 * Module handling helpers 365 * 296 366 ********************************************************************/ 297 367 … … 316 386 317 387 /******************************************************************** 318 * *319 * Executable helpers *320 * *388 * 389 * Executable helpers 390 * 321 391 ********************************************************************/ 322 392 … … 548 618 549 619 /******************************************************************** 550 * *551 * Partition functions *552 * *620 * 621 * Partition functions 622 * 553 623 ********************************************************************/ 554 624
Note:
See TracChangeset
for help on using the changeset viewer.