Author: akhaldi
Date: Tue Mar 2 16:49:27 2010
New Revision: 45757
URL:
http://svn.reactos.org/svn/reactos?rev=45757&view=rev
Log:
- Move more stuff to wdm.h
- Improve Interrupt Request Level definitions
- KeGetCurrentIrql : DDKAPI -> NTAPI
- KeGetCurrentThread : Fix the definition, remove a redundant one and NTKERNELAPI ->
NTSYSAPI
Modified:
branches/header-work/include/ddk/wdm.h
branches/header-work/include/ddk/winddk.h
Modified: branches/header-work/include/ddk/wdm.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/wdm.h?r…
==============================================================================
--- branches/header-work/include/ddk/wdm.h [iso-8859-1] (original)
+++ branches/header-work/include/ddk/wdm.h [iso-8859-1] Tue Mar 2 16:49:27 2010
@@ -962,6 +962,14 @@
#define LOCK_QUEUE_TIMER_TABLE_LOCKS (1 << (8 - LOCK_QUEUE_TIMER_LOCK_SHIFT))
#define PROCESSOR_FEATURE_MAX 64
+
+#define DBG_STATUS_CONTROL_C 1
+#define DBG_STATUS_SYSRQ 2
+#define DBG_STATUS_BUGCHECK_FIRST 3
+#define DBG_STATUS_BUGCHECK_SECOND 4
+#define DBG_STATUS_FATAL 5
+#define DBG_STATUS_DEBUG_CONTROL 6
+#define DBG_STATUS_WORKER 7
typedef enum _TRACE_INFORMATION_CLASS {
TraceIdClass,
@@ -4873,6 +4881,10 @@
#define RTL_QUERY_REGISTRY_DIRECT 0x00000020
#define RTL_QUERY_REGISTRY_DELETE 0x00000040
+#define HASH_STRING_ALGORITHM_DEFAULT 0
+#define HASH_STRING_ALGORITHM_X65599 1
+#define HASH_STRING_ALGORITHM_INVALID 0xffffffff
+
typedef struct _RTL_BITMAP {
ULONG SizeOfBitMap;
PULONG Buffer;
@@ -5920,6 +5932,72 @@
/******************************************************************************
* Executive Types *
******************************************************************************/
+
+#define MAXIMUM_SUPPORTED_EXTENSION 512
+
+typedef ULONG PFN_COUNT;
+typedef ULONG PFN_NUMBER, *PPFN_NUMBER;
+typedef LONG SPFN_NUMBER, *PSPFN_NUMBER;
+
+#if defined(_X86_)
+
+#define PASSIVE_LEVEL 0
+#define LOW_LEVEL 0
+#define APC_LEVEL 1
+#define DISPATCH_LEVEL 2
+#define CMCI_LEVEL 5
+#define PROFILE_LEVEL 27
+#define CLOCK1_LEVEL 28
+#define CLOCK2_LEVEL 28
+#define IPI_LEVEL 29
+#define POWER_LEVEL 30
+#define HIGH_LEVEL 31
+#define CLOCK_LEVEL (CLOCK2_LEVEL)
+
+#endif
+#if defined(_AMD64_)
+
+#define PASSIVE_LEVEL 0
+#define LOW_LEVEL 0
+#define APC_LEVEL 1
+#define DISPATCH_LEVEL 2
+#define CMCI_LEVEL 5
+#define CLOCK_LEVEL 13
+#define IPI_LEVEL 14
+#define DRS_LEVEL 14
+#define POWER_LEVEL 14
+#define PROFILE_LEVEL 15
+#define HIGH_LEVEL 15
+
+#endif
+#if defined(_IA64_)
+
+#define PASSIVE_LEVEL 0
+#define LOW_LEVEL 0
+#define APC_LEVEL 1
+#define DISPATCH_LEVEL 2
+#define CMC_LEVEL 3
+#define DEVICE_LEVEL_BASE 4
+#define PC_LEVEL 12
+#define IPI_LEVEL 14
+#define DRS_LEVEL 14
+#define CLOCK_LEVEL 13
+#define POWER_LEVEL 15
+#define PROFILE_LEVEL 15
+#define HIGH_LEVEL 15
+
+#endif
+
+typedef struct _KFLOATING_SAVE {
+ ULONG ControlWord;
+ ULONG StatusWord;
+ ULONG ErrorOffset;
+ ULONG ErrorSelector;
+ ULONG DataOffset;
+ ULONG DataSelector;
+ ULONG Cr0NpxState;
+ ULONG Spare1;
+} KFLOATING_SAVE, *PKFLOATING_SAVE;
typedef enum _KBUGCHECK_CALLBACK_REASON {
KbCallbackInvalid,
@@ -6826,6 +6904,49 @@
#endif // !defined(MIDL_PASS)
+NTHALAPI
+KIRQL
+NTAPI
+KeGetCurrentIrql(
+ VOID);
+
+#if defined(_M_AMD64)
+
+ULONG64
+__readgsqword (
+ IN ULONG Offset);
+
+#pragma intrinsic(__readgsqword)
+
+FORCEINLINE
+PKTHREAD
+KeGetCurrentThread (
+ VOID)
+{
+ return (struct _KTHREAD *)__readgsqword(0x188);
+}
+
+#endif
+
+#if defined(_M_IX86) || defined(_M_IA64)
+
+NTSYSAPI
+PKTHREAD
+NTAPI
+KeGetCurrentThread(
+ VOID);
+
+#endif
+
+/*
+** WMI structures
+*/
+
+typedef VOID
+(DDKAPI *WMI_NOTIFICATION_CALLBACK)(
+ PVOID Wnode,
+ PVOID Context);
+
#ifdef __cplusplus
}
Modified: branches/header-work/include/ddk/winddk.h
URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/winddk.…
==============================================================================
--- branches/header-work/include/ddk/winddk.h [iso-8859-1] (original)
+++ branches/header-work/include/ddk/winddk.h [iso-8859-1] Tue Mar 2 16:49:27 2010
@@ -1573,14 +1573,6 @@
IN HANDLE ThreadId,
IN KPROCESSOR_MODE Mode);
-#define DBG_STATUS_CONTROL_C 1
-#define DBG_STATUS_SYSRQ 2
-#define DBG_STATUS_BUGCHECK_FIRST 3
-#define DBG_STATUS_BUGCHECK_SECOND 4
-#define DBG_STATUS_FATAL 5
-#define DBG_STATUS_DEBUG_CONTROL 6
-#define DBG_STATUS_WORKER 7
-
typedef struct _PHYSICAL_MEMORY_RANGE {
PHYSICAL_ADDRESS BaseAddress;
LARGE_INTEGER NumberOfBytes;
@@ -1601,27 +1593,11 @@
#define DRIVER_VERIFIER_TRACK_POOL_ALLOCATIONS 0x0008
#define DRIVER_VERIFIER_IO_CHECKING 0x0010
-#define HASH_STRING_ALGORITHM_DEFAULT 0
-#define HASH_STRING_ALGORITHM_X65599 1
-#define HASH_STRING_ALGORITHM_INVALID 0xffffffff
-
typedef VOID
(DDKAPI *PTIMER_APC_ROUTINE)(
IN PVOID TimerContext,
IN ULONG TimerLowValue,
IN LONG TimerHighValue);
-
-
-
-/*
-** WMI structures
-*/
-
-typedef VOID
-(DDKAPI *WMI_NOTIFICATION_CALLBACK)(
- PVOID Wnode,
- PVOID Context);
-
/*
** Architecture specific structures
@@ -1641,7 +1617,6 @@
#define CONTEXT_DEBUG_REGISTERS (CONTEXT_i386|0x00000010L)
#define CONTEXT_EXTENDED_REGISTERS (CONTEXT_i386|0x00000020L)
#define CONTEXT_FULL (CONTEXT_CONTROL|CONTEXT_INTEGER|CONTEXT_SEGMENTS)
-#define MAXIMUM_SUPPORTED_EXTENSION 512
typedef struct _FLOATING_SAVE_AREA {
ULONG ControlWord;
@@ -1683,24 +1658,6 @@
UCHAR ExtendedRegisters[MAXIMUM_SUPPORTED_EXTENSION];
} CONTEXT;
-//
-// Used to contain PFNs and PFN counts
-//
-typedef ULONG PFN_COUNT;
-typedef ULONG PFN_NUMBER, *PPFN_NUMBER;
-typedef LONG SPFN_NUMBER, *PSPFN_NUMBER;
-
-#define PASSIVE_LEVEL 0
-#define LOW_LEVEL 0
-#define APC_LEVEL 1
-#define DISPATCH_LEVEL 2
-#define PROFILE_LEVEL 27
-#define CLOCK1_LEVEL 28
-#define CLOCK2_LEVEL 28
-#define IPI_LEVEL 29
-#define POWER_LEVEL 30
-#define HIGH_LEVEL 31
-
typedef struct _KPCR_TIB {
PVOID ExceptionList; /* 00 */
PVOID StackBase; /* 04 */
@@ -1742,35 +1699,12 @@
#define KeGetPcr() PCR
-typedef struct _KFLOATING_SAVE {
- ULONG ControlWord;
- ULONG StatusWord;
- ULONG ErrorOffset;
- ULONG ErrorSelector;
- ULONG DataOffset;
- ULONG DataSelector;
- ULONG Cr0NpxState;
- ULONG Spare1;
-} KFLOATING_SAVE, *PKFLOATING_SAVE;
-
FORCEINLINE
ULONG
KeGetCurrentProcessorNumber(VOID)
{
return (ULONG)__readfsbyte(FIELD_OFFSET(KPCR, Number));
}
-
-NTHALAPI
-KIRQL
-DDKAPI
-KeGetCurrentIrql(
- VOID);
-
-NTKERNELAPI
-PRKTHREAD
-NTAPI
-KeGetCurrentThread(
- VOID);
#define KI_USER_SHARED_DATA 0xffdf0000
@@ -2026,12 +1960,6 @@
typedef struct _KFLOATING_SAVE {
ULONG Dummy;
} KFLOATING_SAVE, *PKFLOATING_SAVE;
-
-NTKERNELAPI
-PRKTHREAD
-NTAPI
-KeGetCurrentThread(
- VOID);
FORCEINLINE
PKPCR