From 6a0d45da073860084b10615d8367f3be6fe5b712 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Tue, 28 Apr 2015 21:26:56 +0000 Subject: [PATCH] [NDK] - 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 | 15 ----- reactos/include/ndk/ketypes.h | 80 +++++++++++++++++++++++++- reactos/ntoskrnl/include/internal/ke.h | 6 -- 3 files changed, 79 insertions(+), 22 deletions(-) diff --git a/reactos/include/ndk/amd64/ketypes.h b/reactos/include/ndk/amd64/ketypes.h index 2b30d60a886..9f7c31023dd 100644 --- a/reactos/include/ndk/amd64/ketypes.h +++ b/reactos/include/ndk/amd64/ketypes.h @@ -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 // diff --git a/reactos/include/ndk/ketypes.h b/reactos/include/ndk/ketypes.h index e939b7a8a8b..707bf51910a 100644 --- a/reactos/include/ndk/ketypes.h +++ b/reactos/include/ndk/ketypes.h @@ -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; // diff --git a/reactos/ntoskrnl/include/internal/ke.h b/reactos/ntoskrnl/include/internal/ke.h index bff87b8846e..b1bc5f21938 100644 --- a/reactos/ntoskrnl/include/internal/ke.h +++ b/reactos/ntoskrnl/include/internal/ke.h @@ -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 -- 2.17.1