- Move more stuff to wdm.h
authorAmine Khaldi <amine.khaldi@reactos.org>
Mon, 1 Mar 2010 14:32:44 +0000 (14:32 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Mon, 1 Mar 2010 14:32:44 +0000 (14:32 +0000)
- Improve KWAIT_REASON
- Group related definitions

svn path=/branches/header-work/; revision=45745

include/ddk/wdm.h
include/ddk/winddk.h

index 259abc3..83dd33e 100644 (file)
@@ -981,6 +981,47 @@ typedef enum _KPROFILE_SOURCE {
   ProfileMaximum
 } KPROFILE_SOURCE;
 
   ProfileMaximum
 } KPROFILE_SOURCE;
 
+typedef enum _KWAIT_REASON {
+  Executive,
+  FreePage,
+  PageIn,
+  PoolAllocation,
+  DelayExecution,
+  Suspended,
+  UserRequest,
+  WrExecutive,
+  WrFreePage,
+  WrPageIn,
+  WrPoolAllocation,
+  WrDelayExecution,
+  WrSuspended,
+  WrUserRequest,
+  WrEventPair,
+  WrQueue,
+  WrLpcReceive,
+  WrLpcReply,
+  WrVirtualMemory,
+  WrPageOut,
+  WrRendezvous,
+  WrKeyedEvent,
+  WrTerminated,
+  WrProcessInSwap,
+  WrCpuRateControl,
+  WrCalloutStack,
+  WrKernel,
+  WrResource,
+  WrPushLock,
+  WrMutex,
+  WrQuantumEnd,
+  WrDispatchInt,
+  WrPreempted,
+  WrYieldExecution,
+  WrFastMutex,
+  WrGuardedMutex,
+  WrRundown,
+  MaximumWaitReason
+} KWAIT_REASON;
+
 typedef enum _KD_OPTION {
     KD_OPTION_SET_BLOCK_ENABLE,
 } KD_OPTION;
 typedef enum _KD_OPTION {
     KD_OPTION_SET_BLOCK_ENABLE,
 } KD_OPTION;
@@ -2465,6 +2506,101 @@ IoMapTransfer(
 #define FILE_DEVICE_BIOMETRIC             0x00000044
 #define FILE_DEVICE_PMI                   0x00000045
 
 #define FILE_DEVICE_BIOMETRIC             0x00000044
 #define FILE_DEVICE_PMI                   0x00000045
 
+#define MAXIMUM_VOLUME_LABEL_LENGTH       (32 * sizeof(WCHAR))
+
+typedef struct _VPB {
+  CSHORT  Type;
+  CSHORT  Size;
+  USHORT  Flags;
+  USHORT  VolumeLabelLength;
+  struct _DEVICE_OBJECT  *DeviceObject;
+  struct _DEVICE_OBJECT  *RealDevice;
+  ULONG  SerialNumber;
+  ULONG  ReferenceCount;
+  WCHAR  VolumeLabel[MAXIMUM_VOLUME_LABEL_LENGTH / sizeof(WCHAR)];
+} VPB, *PVPB;
+
+typedef struct _DEVICE_OBJECT {
+  CSHORT  Type;
+  USHORT  Size;
+  LONG  ReferenceCount;
+  struct _DRIVER_OBJECT  *DriverObject;
+  struct _DEVICE_OBJECT  *NextDevice;
+  struct _DEVICE_OBJECT  *AttachedDevice;
+  struct _IRP  *CurrentIrp;
+  PIO_TIMER  Timer;
+  ULONG  Flags;
+  ULONG  Characteristics;
+  volatile PVPB  Vpb;
+  PVOID  DeviceExtension;
+  DEVICE_TYPE  DeviceType;
+  CCHAR  StackSize;
+  union {
+    LIST_ENTRY  ListEntry;
+    WAIT_CONTEXT_BLOCK  Wcb;
+  } Queue;
+  ULONG  AlignmentRequirement;
+  KDEVICE_QUEUE  DeviceQueue;
+  KDPC  Dpc;
+  ULONG  ActiveThreadCount;
+  PSECURITY_DESCRIPTOR  SecurityDescriptor;
+  KEVENT  DeviceLock;
+  USHORT  SectorSize;
+  USHORT  Spare1;
+  struct _DEVOBJ_EXTENSION  *DeviceObjectExtension;
+  PVOID  Reserved;
+} DEVICE_OBJECT, *PDEVICE_OBJECT;
+
+typedef struct _IO_REMOVE_LOCK_TRACKING_BLOCK * PIO_REMOVE_LOCK_TRACKING_BLOCK;
+
+typedef struct _IO_REMOVE_LOCK_COMMON_BLOCK {
+  BOOLEAN  Removed;
+  BOOLEAN  Reserved[3];
+  volatile LONG  IoCount;
+  KEVENT  RemoveEvent;
+} IO_REMOVE_LOCK_COMMON_BLOCK;
+
+typedef struct _IO_REMOVE_LOCK_DBG_BLOCK {
+  LONG  Signature;
+  LONG  HighWatermark;
+  LONGLONG  MaxLockedTicks;
+  LONG  AllocateTag;
+  LIST_ENTRY  LockList;
+  KSPIN_LOCK  Spin;
+  volatile LONG  LowMemoryCount;
+  ULONG  Reserved1[4];
+  PVOID  Reserved2;
+  PIO_REMOVE_LOCK_TRACKING_BLOCK  Blocks;
+} IO_REMOVE_LOCK_DBG_BLOCK;
+
+typedef struct _IO_REMOVE_LOCK {
+  IO_REMOVE_LOCK_COMMON_BLOCK  Common;
+#if DBG
+  IO_REMOVE_LOCK_DBG_BLOCK  Dbg;
+#endif
+} IO_REMOVE_LOCK, *PIO_REMOVE_LOCK;
+
+typedef struct _IO_WORKITEM *PIO_WORKITEM;
+
+typedef VOID
+(DDKAPI IO_WORKITEM_ROUTINE)(
+  IN PDEVICE_OBJECT  DeviceObject,
+  IN PVOID  Context);
+typedef IO_WORKITEM_ROUTINE *PIO_WORKITEM_ROUTINE;
+
+typedef struct _SHARE_ACCESS {
+  ULONG  OpenCount;
+  ULONG  Readers;
+  ULONG  Writers;
+  ULONG  Deleters;
+  ULONG  SharedRead;
+  ULONG  SharedWrite;
+  ULONG  SharedDelete;
+} SHARE_ACCESS, *PSHARE_ACCESS;
+
+
+
+
 typedef struct _PCI_SLOT_NUMBER {
   union {
     struct {
 typedef struct _PCI_SLOT_NUMBER {
   union {
     struct {
@@ -3356,8 +3492,6 @@ typedef struct _IO_COMPLETION_CONTEXT {
 #define VPB_RAW_MOUNT                     0x0010
 #define VPB_DIRECT_WRITES_ALLOWED         0x0020
 
 #define VPB_RAW_MOUNT                     0x0010
 #define VPB_DIRECT_WRITES_ALLOWED         0x0020
 
-#define MAXIMUM_VOLUME_LABEL_LENGTH       (32 * sizeof(WCHAR))
-
 /* IRP.Flags */
 
 #define SL_FORCE_ACCESS_CHECK             0x01
 /* IRP.Flags */
 
 #define SL_FORCE_ACCESS_CHECK             0x01
@@ -3490,49 +3624,6 @@ typedef struct _IO_COMPLETION_CONTEXT {
 
 #define IRP_MN_REGINFO_EX                 0x0b
 
 
 #define IRP_MN_REGINFO_EX                 0x0b
 
-typedef struct _VPB {
-  CSHORT  Type;
-  CSHORT  Size;
-  USHORT  Flags;
-  USHORT  VolumeLabelLength;
-  struct _DEVICE_OBJECT  *DeviceObject;
-  struct _DEVICE_OBJECT  *RealDevice;
-  ULONG  SerialNumber;
-  ULONG  ReferenceCount;
-  WCHAR  VolumeLabel[MAXIMUM_VOLUME_LABEL_LENGTH / sizeof(WCHAR)];
-} VPB, *PVPB;
-
-typedef struct _DEVICE_OBJECT {
-  CSHORT  Type;
-  USHORT  Size;
-  LONG  ReferenceCount;
-  struct _DRIVER_OBJECT  *DriverObject;
-  struct _DEVICE_OBJECT  *NextDevice;
-  struct _DEVICE_OBJECT  *AttachedDevice;
-  struct _IRP  *CurrentIrp;
-  PIO_TIMER  Timer;
-  ULONG  Flags;
-  ULONG  Characteristics;
-  volatile PVPB  Vpb;
-  PVOID  DeviceExtension;
-  DEVICE_TYPE  DeviceType;
-  CCHAR  StackSize;
-  union {
-    LIST_ENTRY  ListEntry;
-    WAIT_CONTEXT_BLOCK  Wcb;
-  } Queue;
-  ULONG  AlignmentRequirement;
-  KDEVICE_QUEUE  DeviceQueue;
-  KDPC  Dpc;
-  ULONG  ActiveThreadCount;
-  PSECURITY_DESCRIPTOR  SecurityDescriptor;
-  KEVENT  DeviceLock;
-  USHORT  SectorSize;
-  USHORT  Spare1;
-  struct _DEVOBJ_EXTENSION  *DeviceObjectExtension;
-  PVOID  Reserved;
-} DEVICE_OBJECT, *PDEVICE_OBJECT;
-
 typedef struct _FILE_OBJECT
 {
     CSHORT Type;
 typedef struct _FILE_OBJECT
 {
     CSHORT Type;
index 3dce7b8..8f95f73 100644 (file)
@@ -1315,44 +1315,6 @@ typedef enum _EVENT_TYPE {
   SynchronizationEvent
 } EVENT_TYPE;
 
   SynchronizationEvent
 } EVENT_TYPE;
 
-typedef enum _KWAIT_REASON {
-  Executive,
-  FreePage,
-  PageIn,
-  PoolAllocation,
-  DelayExecution,
-  Suspended,
-  UserRequest,
-  WrExecutive,
-  WrFreePage,
-  WrPageIn,
-  WrPoolAllocation,
-  WrDelayExecution,
-  WrSuspended,
-  WrUserRequest,
-  WrEventPair,
-  WrQueue,
-  WrLpcReceive,
-  WrLpcReply,
-  WrVirtualMemory,
-  WrPageOut,
-  WrRendezvous,
-  Spare2,
-  WrGuardedMutex,
-  Spare4,
-  Spare5,
-  Spare6,
-  WrKernel,
-  WrResource,
-  WrPushLock,
-  WrMutex,
-  WrQuantumEnd,
-  WrDispatchInt,
-  WrPreempted,
-  WrYieldExecution,
-  MaximumWaitReason
-} KWAIT_REASON;
-
 typedef struct _KWAIT_BLOCK {
   LIST_ENTRY  WaitListEntry;
   struct _KTHREAD * RESTRICTED_POINTER  Thread;
 typedef struct _KWAIT_BLOCK {
   LIST_ENTRY  WaitListEntry;
   struct _KTHREAD * RESTRICTED_POINTER  Thread;
@@ -1363,53 +1325,6 @@ typedef struct _KWAIT_BLOCK {
   UCHAR SpareByte;
 } KWAIT_BLOCK, *PKWAIT_BLOCK, *RESTRICTED_POINTER PRKWAIT_BLOCK;
 
   UCHAR SpareByte;
 } KWAIT_BLOCK, *PKWAIT_BLOCK, *RESTRICTED_POINTER PRKWAIT_BLOCK;
 
-typedef struct _IO_REMOVE_LOCK_TRACKING_BLOCK * PIO_REMOVE_LOCK_TRACKING_BLOCK;
-
-typedef struct _IO_REMOVE_LOCK_COMMON_BLOCK {
-  BOOLEAN  Removed;
-  BOOLEAN  Reserved[3];
-  volatile LONG  IoCount;
-  KEVENT  RemoveEvent;
-} IO_REMOVE_LOCK_COMMON_BLOCK;
-
-typedef struct _IO_REMOVE_LOCK_DBG_BLOCK {
-  LONG  Signature;
-  LONG  HighWatermark;
-  LONGLONG  MaxLockedTicks;
-  LONG  AllocateTag;
-  LIST_ENTRY  LockList;
-  KSPIN_LOCK  Spin;
-  volatile LONG  LowMemoryCount;
-  ULONG  Reserved1[4];
-  PVOID  Reserved2;
-  PIO_REMOVE_LOCK_TRACKING_BLOCK  Blocks;
-} IO_REMOVE_LOCK_DBG_BLOCK;
-
-typedef struct _IO_REMOVE_LOCK {
-  IO_REMOVE_LOCK_COMMON_BLOCK  Common;
-#if DBG
-  IO_REMOVE_LOCK_DBG_BLOCK  Dbg;
-#endif
-} IO_REMOVE_LOCK, *PIO_REMOVE_LOCK;
-
-typedef struct _IO_WORKITEM *PIO_WORKITEM;
-
-typedef VOID
-(DDKAPI IO_WORKITEM_ROUTINE)(
-  IN PDEVICE_OBJECT  DeviceObject,
-  IN PVOID  Context);
-typedef IO_WORKITEM_ROUTINE *PIO_WORKITEM_ROUTINE;
-
-typedef struct _SHARE_ACCESS {
-  ULONG  OpenCount;
-  ULONG  Readers;
-  ULONG  Writers;
-  ULONG  Deleters;
-  ULONG  SharedRead;
-  ULONG  SharedWrite;
-  ULONG  SharedDelete;
-} SHARE_ACCESS, *PSHARE_ACCESS;
-
 typedef enum _KINTERRUPT_MODE {
   LevelSensitive,
   Latched
 typedef enum _KINTERRUPT_MODE {
   LevelSensitive,
   Latched