Skip to content

Commit 014cb05

Browse files
committed
phlib: Update RS2 headers
1 parent 596f370 commit 014cb05

File tree

3 files changed

+33
-14
lines changed

3 files changed

+33
-14
lines changed

ProcessHacker/syssccpu.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -861,8 +861,8 @@ BOOLEAN PhSipGetCpuFrequencyFromDistribution(
861861

862862
for (i = 0; i < NumberOfProcessors; i++)
863863
{
864-
stateDistribution = (PSYSTEM_PROCESSOR_PERFORMANCE_STATE_DISTRIBUTION)((PCHAR)CurrentPerformanceDistribution + CurrentPerformanceDistribution->Offsets[i]);
865-
stateDifference = (PSYSTEM_PROCESSOR_PERFORMANCE_STATE_DISTRIBUTION)((PCHAR)differences + stateSize * i);
864+
stateDistribution = (PSYSTEM_PROCESSOR_PERFORMANCE_STATE_DISTRIBUTION)PTR_ADD_OFFSET(CurrentPerformanceDistribution, CurrentPerformanceDistribution->Offsets[i]);
865+
stateDifference = (PSYSTEM_PROCESSOR_PERFORMANCE_STATE_DISTRIBUTION)PTR_ADD_OFFSET(differences, stateSize * i);
866866

867867
if (stateDistribution->StateCount != 2)
868868
{
@@ -878,17 +878,17 @@ BOOLEAN PhSipGetCpuFrequencyFromDistribution(
878878
}
879879
else
880880
{
881-
hitcountOld = (PSYSTEM_PROCESSOR_PERFORMANCE_HITCOUNT_WIN8)((PCHAR)stateDistribution->States + sizeof(SYSTEM_PROCESSOR_PERFORMANCE_HITCOUNT_WIN8) * j);
882-
stateDifference->States[j].Hits.QuadPart = hitcountOld->Hits;
881+
hitcountOld = (PSYSTEM_PROCESSOR_PERFORMANCE_HITCOUNT_WIN8)PTR_ADD_OFFSET(stateDistribution->States, sizeof(SYSTEM_PROCESSOR_PERFORMANCE_HITCOUNT_WIN8) * j);
882+
stateDifference->States[j].Hits = hitcountOld->Hits;
883883
stateDifference->States[j].PercentFrequency = hitcountOld->PercentFrequency;
884884
}
885885
}
886886
}
887887

888888
for (i = 0; i < NumberOfProcessors; i++)
889889
{
890-
stateDistribution = (PSYSTEM_PROCESSOR_PERFORMANCE_STATE_DISTRIBUTION)((PCHAR)PreviousPerformanceDistribution + PreviousPerformanceDistribution->Offsets[i]);
891-
stateDifference = (PSYSTEM_PROCESSOR_PERFORMANCE_STATE_DISTRIBUTION)((PCHAR)differences + stateSize * i);
890+
stateDistribution = (PSYSTEM_PROCESSOR_PERFORMANCE_STATE_DISTRIBUTION)PTR_ADD_OFFSET(PreviousPerformanceDistribution, PreviousPerformanceDistribution->Offsets[i]);
891+
stateDifference = (PSYSTEM_PROCESSOR_PERFORMANCE_STATE_DISTRIBUTION)PTR_ADD_OFFSET(differences, stateSize * i);
892892

893893
if (stateDistribution->StateCount != 2)
894894
{
@@ -900,12 +900,12 @@ BOOLEAN PhSipGetCpuFrequencyFromDistribution(
900900
{
901901
if (WindowsVersion >= WINDOWS_8_1)
902902
{
903-
stateDifference->States[j].Hits.QuadPart -= stateDistribution->States[j].Hits.QuadPart;
903+
stateDifference->States[j].Hits -= stateDistribution->States[j].Hits;
904904
}
905905
else
906906
{
907-
hitcountOld = (PSYSTEM_PROCESSOR_PERFORMANCE_HITCOUNT_WIN8)((PCHAR)stateDistribution->States + sizeof(SYSTEM_PROCESSOR_PERFORMANCE_HITCOUNT_WIN8) * j);
908-
stateDifference->States[j].Hits.QuadPart -= hitcountOld->Hits;
907+
hitcountOld = (PSYSTEM_PROCESSOR_PERFORMANCE_HITCOUNT_WIN8)PTR_ADD_OFFSET(stateDistribution->States, sizeof(SYSTEM_PROCESSOR_PERFORMANCE_HITCOUNT_WIN8) * j);
908+
stateDifference->States[j].Hits -= hitcountOld->Hits;
909909
}
910910
}
911911
}
@@ -917,12 +917,12 @@ BOOLEAN PhSipGetCpuFrequencyFromDistribution(
917917

918918
for (i = 0; i < NumberOfProcessors; i++)
919919
{
920-
stateDifference = (PSYSTEM_PROCESSOR_PERFORMANCE_STATE_DISTRIBUTION)((PCHAR)differences + stateSize * i);
920+
stateDifference = (PSYSTEM_PROCESSOR_PERFORMANCE_STATE_DISTRIBUTION)PTR_ADD_OFFSET(differences, stateSize * i);
921921

922922
for (j = 0; j < 2; j++)
923923
{
924-
count += (ULONGLONG)stateDifference->States[j].Hits.QuadPart;
925-
total += (ULONGLONG)stateDifference->States[j].Hits.QuadPart * stateDifference->States[j].PercentFrequency;
924+
count += stateDifference->States[j].Hits;
925+
total += stateDifference->States[j].Hits * stateDifference->States[j].PercentFrequency;
926926
}
927927
}
928928

phnt/include/ntexapi.h

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1626,8 +1626,13 @@ typedef struct _SYSTEM_LOCK_TABLE_ENTRY_INFO
16261626
USHORT Reserved1;
16271627
ULONG ExclusiveOwnerThreadId;
16281628
ULONG ActiveCount;
1629+
USHORT CreatorBackTraceIndex;
1630+
HANDLE OwningThread;
1631+
LONG LockCount;
16291632
ULONG ContentionCount;
16301633
ULONG Reserved2[2];
1634+
ULONG EntryCount;
1635+
LONG RecursionCount;
16311636
ULONG NumberOfSharedWaiters;
16321637
ULONG NumberOfExclusiveWaiters;
16331638
} SYSTEM_LOCK_TABLE_ENTRY_INFO, *PSYSTEM_LOCK_TABLE_ENTRY_INFO;
@@ -2084,6 +2089,7 @@ typedef struct _SYSTEM_BOOT_ENVIRONMENT_INFORMATION
20842089
{
20852090
GUID BootIdentifier;
20862091
FIRMWARE_TYPE FirmwareType;
2092+
ULONGLONG BootFlags;
20872093
} SYSTEM_BOOT_ENVIRONMENT_INFORMATION, *PSYSTEM_BOOT_ENVIRONMENT_INFORMATION;
20882094

20892095
// private
@@ -2101,7 +2107,11 @@ typedef struct _SYSTEM_VERIFIER_INFORMATION_EX
21012107
UNICODE_STRING PreviousBucketName;
21022108
ULONG IrpCancelTimeoutMsec;
21032109
ULONG VerifierExtensionEnabled;
2110+
#ifdef _WIN64
21042111
ULONG Reserved[1];
2112+
#else
2113+
ULONG Reserved[3];
2114+
#endif
21052115
} SYSTEM_VERIFIER_INFORMATION_EX, *PSYSTEM_VERIFIER_INFORMATION_EX;
21062116

21072117
// private
@@ -2119,7 +2129,7 @@ typedef struct _SYSTEM_SYSTEM_DISK_INFORMATION
21192129
// private
21202130
typedef struct _SYSTEM_PROCESSOR_PERFORMANCE_HITCOUNT
21212131
{
2122-
LARGE_INTEGER Hits; // ULONG in WIN8
2132+
ULONGLONG Hits; // ULONG in WIN8
21232133
UCHAR PercentFrequency;
21242134
} SYSTEM_PROCESSOR_PERFORMANCE_HITCOUNT, *PSYSTEM_PROCESSOR_PERFORMANCE_HITCOUNT;
21252135

@@ -2248,6 +2258,13 @@ typedef struct _SYSTEM_VERIFIER_COUNTERS_INFORMATION
22482258
SIZE_T PeakPagesForMdlBytes;
22492259
SIZE_T ContiguousMemoryBytes;
22502260
SIZE_T PeakContiguousMemoryBytes;
2261+
ULONG ExecutePoolTypes; // REDSTONE2
2262+
ULONG ExecutePageProtections;
2263+
ULONG ExecutePageMappings;
2264+
ULONG ExecuteWriteSections;
2265+
ULONG SectionAlignmentFailures;
2266+
ULONG UnsupportedRelocs;
2267+
ULONG IATInExecutableSection;
22512268
} SYSTEM_VERIFIER_COUNTERS_INFORMATION, *PSYSTEM_VERIFIER_COUNTERS_INFORMATION;
22522269

22532270
// private

phnt/include/ntpsapi.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,9 @@ typedef struct _PROCESS_COMMIT_RELEASE_INFORMATION
671671
struct
672672
{
673673
ULONG Eligible : 1;
674-
ULONG Spare : 31;
674+
ULONG ReleaseRepurposedMemResetCommit : 1;
675+
ULONG ForceReleaseMemResetCommit : 1;
676+
ULONG Spare : 29;
675677
};
676678
SIZE_T CommitDebt;
677679
SIZE_T CommittedMemResetSize;

0 commit comments

Comments
 (0)