Module: wine Branch: master Commit: 82cd85b07918a4437428497ffaf7f13286b83479 URL: https://source.winehq.org/git/wine.git/?a=commit;h=82cd85b07918a4437428497ff...
Author: Zebediah Figura z.figura12@gmail.com Date: Tue Jul 7 18:58:34 2020 -0500
ntdll: Set the thread creation time in NtQuerySystemInformation(SystemProcessInformation).
Process Hacker displays this information.
Signed-off-by: Zebediah Figura z.figura12@gmail.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/ntdll/unix/system.c | 2 +- include/wine/server_protocol.h | 3 ++- server/process.c | 1 + server/protocol.def | 1 + server/trace.c | 3 ++- 5 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c index 051bd37fa3..a80d3c4fd4 100644 --- a/dlls/ntdll/unix/system.c +++ b/dlls/ntdll/unix/system.c @@ -2156,7 +2156,7 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class,
if (len <= size) { - nt_process->ti[j].CreateTime.QuadPart = 0xdeadbeef; + nt_process->ti[j].CreateTime.QuadPart = server_thread->start_time; nt_process->ti[j].ClientId.UniqueProcess = UlongToHandle(server_process->pid); nt_process->ti[j].ClientId.UniqueThread = UlongToHandle(server_thread->tid); nt_process->ti[j].dwCurrentPriority = server_thread->current_priority; diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index 87a6619703..df1bd853ea 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -2408,6 +2408,7 @@ struct is_same_mapping_reply
struct thread_info { + timeout_t start_time; thread_id_t tid; int base_priority; int current_priority; @@ -6654,7 +6655,7 @@ union generic_reply
/* ### protocol_version begin ### */
-#define SERVER_PROTOCOL_VERSION 619 +#define SERVER_PROTOCOL_VERSION 620
/* ### protocol_version end ### */
diff --git a/server/process.c b/server/process.c index 8d57879cc1..5e587b28cb 100644 --- a/server/process.c +++ b/server/process.c @@ -1850,6 +1850,7 @@ DECL_HANDLER(list_processes) { struct thread_info *thread_info = (struct thread_info *)(buffer + pos);
+ thread_info->start_time = thread->creation_time; thread_info->tid = thread->id; thread_info->base_priority = thread->priority; thread_info->current_priority = thread->priority; /* FIXME */ diff --git a/server/protocol.def b/server/protocol.def index bf91637e9d..943c1ade1a 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -1862,6 +1862,7 @@ enum char_info_mode
struct thread_info { + timeout_t start_time; thread_id_t tid; int base_priority; int current_priority; diff --git a/server/trace.c b/server/trace.c index 288dad718d..55d7bd85dd 100644 --- a/server/trace.c +++ b/server/trace.c @@ -1128,7 +1128,8 @@ static void dump_varargs_process_info( const char *prefix, data_size_t size ) const struct thread_info *thread = (const struct thread_info *)((const char *)cur_data + pos); if (size - pos < sizeof(*thread)) break; if (i) fputc( ',', stderr ); - fprintf( stderr, "{tid=%04x,base_priority=%d,current_priority=%d,unix_tid=%d}", + dump_timeout( "{start_time=", &thread->start_time ); + fprintf( stderr, ",tid=%04x,base_priority=%d,current_priority=%d,unix_tid=%d}", thread->tid, thread->base_priority, thread->current_priority, thread->unix_tid ); pos += sizeof(*thread); }