Rebase against 3fc1180623b9a0c9fc9e16abf358b179f2eff49b

This commit is contained in:
Alistair Leslie-Hughes
2019-02-15 11:18:02 +11:00
parent 27ff0169ed
commit 7cbbfd0a9e
11 changed files with 131 additions and 389 deletions

View File

@@ -1,19 +1,19 @@
From 507f3b20311ceae6a42bde2937d82031594d0b32 Mon Sep 17 00:00:00 2001
From 41da6df255dd09494827ad780e5821e119b4507b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 9 Mar 2017 16:27:23 +0100
Subject: [PATCH] ntdll: Fill process kernel and user time.
---
dlls/ntdll/nt.c | 6 ++-
dlls/ntdll/nt.c | 6 +++-
dlls/ntdll/ntdll_misc.h | 3 ++
dlls/ntdll/thread.c | 84 +++++++++++++++++++++++------------------
dlls/ntdll/thread.c | 84 ++++++++++++++++++++++++++++---------------------
3 files changed, 56 insertions(+), 37 deletions(-)
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index fcc5c635a68..2b5cf5d0ae3 100644
index 0db0d16..c370550 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -2452,6 +2452,7 @@ NTSTATUS WINAPI NtQuerySystemInformation(
@@ -2451,6 +2451,7 @@ NTSTATUS WINAPI NtQuerySystemInformation(
{
SYSTEM_PROCESS_INFORMATION* spi = SystemInformation;
SYSTEM_PROCESS_INFORMATION* last = NULL;
@@ -21,7 +21,7 @@ index fcc5c635a68..2b5cf5d0ae3 100644
HANDLE hSnap = 0;
WCHAR procname[1024];
WCHAR* exename;
@@ -2489,7 +2490,7 @@ NTSTATUS WINAPI NtQuerySystemInformation(
@@ -2488,7 +2489,7 @@ NTSTATUS WINAPI NtQuerySystemInformation(
if (Length >= len + procstructlen)
{
@@ -30,7 +30,7 @@ index fcc5c635a68..2b5cf5d0ae3 100644
* vmCounters, ioCounters
*/
@@ -2507,6 +2508,9 @@ NTSTATUS WINAPI NtQuerySystemInformation(
@@ -2506,6 +2507,9 @@ NTSTATUS WINAPI NtQuerySystemInformation(
/* spi->ti will be set later on */
@@ -41,22 +41,22 @@ index fcc5c635a68..2b5cf5d0ae3 100644
len += procstructlen;
}
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
index 6b71ded85b1..4a411292cdc 100644
index fdc54c6..69005d0 100644
--- a/dlls/ntdll/ntdll_misc.h
+++ b/dlls/ntdll/ntdll_misc.h
@@ -258,4 +258,7 @@ extern HANDLE keyed_event DECLSPEC_HIDDEN;
@@ -260,4 +260,7 @@ extern SYSTEM_CPU_INFORMATION cpu_info DECLSPEC_HIDDEN;
NTSTATUS WINAPI RtlHashUnicodeString(PCUNICODE_STRING,BOOLEAN,ULONG,ULONG*);
void WINAPI LdrInitializeThunk(CONTEXT*,void**,ULONG_PTR,ULONG_PTR);
+/* process / thread time */
+extern BOOL read_process_time(int unix_pid, int unix_tid, unsigned long clk_tck,
+ LARGE_INTEGER *kernel, LARGE_INTEGER *user) DECLSPEC_HIDDEN;
#endif
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index fe99a804c15..fea1244620c 100644
index e4336ab..4279ae7 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -151,6 +151,53 @@ static ULONG_PTR get_image_addr(void)
@@ -149,6 +149,53 @@ static ULONG_PTR get_image_addr(void)
}
#endif
@@ -110,7 +110,7 @@ index fe99a804c15..fea1244620c 100644
/***********************************************************************
* thread_init
*
@@ -929,42 +976,7 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class,
@@ -908,42 +955,7 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class,
#ifdef __linux__
/* only /proc provides exact values for a specific thread */
if (unix_pid != -1 && unix_tid != -1)
@@ -155,5 +155,5 @@ index fe99a804c15..fea1244620c 100644
/* get values for current process instead */
--
2.20.1
1.9.1