fix macro name in iptypes.h
[reactos.git] / include / ndk / potypes.h
1 /*++ NDK Version: 0098
2
3 Copyright (c) Alex Ionescu. All rights reserved.
4
5 Header Name:
6
7 potypes.h
8
9 Abstract:
10
11 Type definitions for the Power Subystem
12
13 Author:
14
15 Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006
16
17 --*/
18
19 #ifndef _POTYPES_H
20 #define _POTYPES_H
21
22 //
23 // Dependencies
24 //
25 #include <umtypes.h>
26 #ifndef NTOS_MODE_USER
27 #include <ntpoapi.h>
28 #endif
29
30 //
31 // Docking states
32 //
33 typedef enum _SYSTEM_DOCK_STATE
34 {
35 SystemDockStateUnknown,
36 SystemUndocked,
37 SystemDocked
38 } SYSTEM_DOCK_STATE, *PSYSTEM_DOCK_STATE;
39
40 #ifndef NTOS_MODE_USER
41
42 //
43 // Processor Power State Data
44 //
45 struct _PROCESSOR_POWER_STATE;
46
47 typedef
48 VOID
49 (FASTCALL *PPROCESSOR_IDLE_FUNCTION)(
50 struct _PROCESSOR_POWER_STATE *PState);
51
52 typedef struct _PROCESSOR_POWER_STATE
53 {
54 PPROCESSOR_IDLE_FUNCTION IdleFunction;
55 ULONG Idle0KernelTimeLimit;
56 ULONG Idle0LastTime;
57 PVOID IdleHandlers;
58 PVOID IdleState;
59 ULONG IdleHandlersCount;
60 ULONGLONG LastCheck;
61 PROCESSOR_IDLE_TIMES IdleTimes;
62 ULONG IdleTime1;
63 ULONG PromotionCheck;
64 ULONG IdleTime2;
65 UCHAR CurrentThrottle;
66 UCHAR ThermalThrottleLimit;
67 UCHAR CurrentThrottleIndex;
68 UCHAR ThermalThrottleIndex;
69 ULONG LastKernelUserTime;
70 ULONG PerfIdleTime;
71 ULONGLONG DebugDelta;
72 ULONG DebugCount;
73 ULONG LastSysTime;
74 ULONGLONG TotalIdleStateTime[3];
75 ULONG TotalIdleTransitions[3];
76 ULONGLONG PreviousC3StateTime;
77 UCHAR KneeThrottleIndex;
78 UCHAR ThrottleLimitIndex;
79 UCHAR PerfStatesCount;
80 UCHAR ProcessorMinThrottle;
81 UCHAR ProcessorMaxThrottle;
82 UCHAR LastBusyPercentage;
83 UCHAR LastC3Percentage;
84 UCHAR LastAdjustedBusyPercentage;
85 ULONG PromotionCount;
86 ULONG DemotionCount;
87 ULONG ErrorCount;
88 ULONG RetryCount;
89 ULONG Flags;
90 LARGE_INTEGER PerfCounterFrequency;
91 ULONG PerfTickCount;
92 KTIMER PerfTimer;
93 KDPC PerfDpc;
94 PROCESSOR_PERF_STATE *PerfStates;
95 PVOID PerfSetThrottle;
96 ULONG LastC3KernelUserTime;
97 ULONG Spare1[1];
98 } PROCESSOR_POWER_STATE, *PPROCESSOR_POWER_STATE;
99
100 //
101 // Device Notification Structure
102 //
103 typedef struct _PO_DEVICE_NOTIFY
104 {
105 LIST_ENTRY Link;
106 PDEVICE_OBJECT TargetDevice;
107 UCHAR WakeNeeded;
108 UCHAR OrderLevel;
109 PDEVICE_OBJECT DeviceObject;
110 PVOID Node;
111 PUSHORT DeviceName;
112 PUSHORT DriverName;
113 ULONG ChildCount;
114 ULONG ActiveChild;
115 } PO_DEVICE_NOTIFY, *PPO_DEVICE_NOTIFY;
116
117 //
118 // Power IRP Queue
119 //
120 typedef struct _PO_IRP_QUEUE
121 {
122 PIRP CurrentIrp;
123 PIRP PendingIrpList;
124 } PO_IRP_QUEUE, *PPO_IRP_QUEUE;
125
126 // Power IRP Manager
127 typedef struct _PO_IRP_MANAGER
128 {
129 PO_IRP_QUEUE DeviceIrpQueue;
130 PO_IRP_QUEUE SystemIrpQueue;
131 } PO_IRP_MANAGER, *PPO_IRP_MANAGER;
132
133 #endif // !NTOS_MODE_USER
134
135 #endif // _POTYPES_H