[NDK]
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Tue, 28 Apr 2015 21:26:56 +0000 (21:26 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Tue, 28 Apr 2015 21:26:56 +0000 (21:26 +0000)
- Move definition of TIMER_TABLE_ENTRY from ntoskrnl to NDK
- Add definitions of KTIMER_TABLE, KDPC_LIST, SYNCH_COUNTERS

svn path=/trunk/; revision=67471

reactos/include/ndk/amd64/ketypes.h
reactos/include/ndk/ketypes.h
reactos/ntoskrnl/include/internal/ke.h

index 2b30d60..9f7c310 100644 (file)
@@ -906,21 +906,6 @@ typedef struct _KSWITCH_FRAME
     ULONG64 Return;
 } KSWITCH_FRAME, *PKSWITCH_FRAME;
 
-#if 0
-typedef struct _KTIMER_TABLE_ENTRY
-{
-    ULONG_PTR Lock;
-    LIST_ENTRY Entry;
-    ULARGE_INTEGER Time;
-} KTIMER_TABLE_ENTRY, *PKTIMER_TABLE_ENTRY;
-
-typedef struct _KTIMER_TABLE
-{
-    KTIMER* TimerExpiry[64];
-    KTIMER_TABLE_ENTRY TimerEntries[256];
-} KTIMER_TABLE, *PKTIMER_TABLE;
-#endif
-
 //
 // Inline function to get current KPRCB
 //
index e939b7a..707bf51 100644 (file)
@@ -629,19 +629,97 @@ typedef enum _KAPC_ENVIRONMENT
     InsertApcEnvironment
 } KAPC_ENVIRONMENT;
 
+typedef struct _KTIMER_TABLE_ENTRY
+{
+#if (NTDDI_VERSION >= NTDDI_LONGHORN) || defined(_M_ARM) || defined(_M_AMD64)
+    KSPIN_LOCK Lock;
+#endif
+    LIST_ENTRY Entry;
+    ULARGE_INTEGER Time;
+} KTIMER_TABLE_ENTRY, *PKTIMER_TABLE_ENTRY;
+
+typedef struct _KTIMER_TABLE
+{
+    PKTIMER TimerExpiry[64];
+    KTIMER_TABLE_ENTRY TimerEntries[256];
+} KTIMER_TABLE, *PKTIMER_TABLE;
+
+typedef struct _KDPC_LIST
+{
+    SINGLE_LIST_ENTRY ListHead;
+    SINGLE_LIST_ENTRY* LastEntry;
+} KDPC_LIST, *PKDPC_LIST;
+
+typedef struct _SYNCH_COUNTERS
+{
+    ULONG SpinLockAcquireCount;
+    ULONG SpinLockContentionCount;
+    ULONG SpinLockSpinCount;
+    ULONG IpiSendRequestBroadcastCount;
+    ULONG IpiSendRequestRoutineCount;
+    ULONG IpiSendSoftwareInterruptCount;
+    ULONG ExInitializeResourceCount;
+    ULONG ExReInitializeResourceCount;
+    ULONG ExDeleteResourceCount;
+    ULONG ExecutiveResourceAcquiresCount;
+    ULONG ExecutiveResourceContentionsCount;
+    ULONG ExecutiveResourceReleaseExclusiveCount;
+    ULONG ExecutiveResourceReleaseSharedCount;
+    ULONG ExecutiveResourceConvertsCount;
+    ULONG ExAcqResExclusiveAttempts;
+    ULONG ExAcqResExclusiveAcquiresExclusive;
+    ULONG ExAcqResExclusiveAcquiresExclusiveRecursive;
+    ULONG ExAcqResExclusiveWaits;
+    ULONG ExAcqResExclusiveNotAcquires;
+    ULONG ExAcqResSharedAttempts;
+    ULONG ExAcqResSharedAcquiresExclusive;
+    ULONG ExAcqResSharedAcquiresShared;
+    ULONG ExAcqResSharedAcquiresSharedRecursive;
+    ULONG ExAcqResSharedWaits;
+    ULONG ExAcqResSharedNotAcquires;
+    ULONG ExAcqResSharedStarveExclusiveAttempts;
+    ULONG ExAcqResSharedStarveExclusiveAcquiresExclusive;
+    ULONG ExAcqResSharedStarveExclusiveAcquiresShared;
+    ULONG ExAcqResSharedStarveExclusiveAcquiresSharedRecursive;
+    ULONG ExAcqResSharedStarveExclusiveWaits;
+    ULONG ExAcqResSharedStarveExclusiveNotAcquires;
+    ULONG ExAcqResSharedWaitForExclusiveAttempts;
+    ULONG ExAcqResSharedWaitForExclusiveAcquiresExclusive;
+    ULONG ExAcqResSharedWaitForExclusiveAcquiresShared;
+    ULONG ExAcqResSharedWaitForExclusiveAcquiresSharedRecursive;
+    ULONG ExAcqResSharedWaitForExclusiveWaits;
+    ULONG ExAcqResSharedWaitForExclusiveNotAcquires;
+    ULONG ExSetResOwnerPointerExclusive;
+    ULONG ExSetResOwnerPointerSharedNew;
+    ULONG ExSetResOwnerPointerSharedOld;
+    ULONG ExTryToAcqExclusiveAttempts;
+    ULONG ExTryToAcqExclusiveAcquires;
+    ULONG ExBoostExclusiveOwner;
+    ULONG ExBoostSharedOwners;
+    ULONG ExEtwSynchTrackingNotificationsCount;
+    ULONG ExEtwSynchTrackingNotificationsAccountedCount;
+} SYNCH_COUNTERS, *PSYNCH_COUNTERS;
+
 //
 // PRCB DPC Data
 //
 typedef struct _KDPC_DATA
 {
+#if (NTDDI_VERSION >= NTDDI_LONGHORN)
+    KDPC_LIST DpcList;
+#else
     LIST_ENTRY DpcListHead;
+#endif
     ULONG_PTR DpcLock;
-#ifdef _M_AMD64
+#if defined(_M_AMD64) || defined(_M_ARM)
     volatile LONG DpcQueueDepth;
 #else
     volatile ULONG DpcQueueDepth;
 #endif
     ULONG DpcCount;
+#if (NTDDI_VERSION >= NTDDI_LONGHORN) || defined(_M_ARM)
+    PKDPC ActiveDpc;
+#endif
 } KDPC_DATA, *PKDPC_DATA;
 
 //
index bff87b8..b1bc5f2 100644 (file)
@@ -54,12 +54,6 @@ typedef struct _KI_SAMPLE_MAP
     ULONG MHz;
 } KI_SAMPLE_MAP, *PKI_SAMPLE_MAP;
 
-typedef struct _KTIMER_TABLE_ENTRY
-{
-    LIST_ENTRY Entry;
-    ULARGE_INTEGER Time;
-} KTIMER_TABLE_ENTRY, *PKTIMER_TABLE_ENTRY;
-
 #define MAX_TIMER_DPCS                      16
 
 typedef struct _DPC_QUEUE_ENTRY