Commit 82cd85b0 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

ntdll: Set the thread creation time in NtQuerySystemInformation(SystemProcessInformation).

Process Hacker displays this information. Signed-off-by: 's avatarZebediah Figura <z.figura12@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 82973927
...@@ -2156,7 +2156,7 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class, ...@@ -2156,7 +2156,7 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class,
if (len <= size) 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.UniqueProcess = UlongToHandle(server_process->pid);
nt_process->ti[j].ClientId.UniqueThread = UlongToHandle(server_thread->tid); nt_process->ti[j].ClientId.UniqueThread = UlongToHandle(server_thread->tid);
nt_process->ti[j].dwCurrentPriority = server_thread->current_priority; nt_process->ti[j].dwCurrentPriority = server_thread->current_priority;
......
...@@ -2408,6 +2408,7 @@ struct is_same_mapping_reply ...@@ -2408,6 +2408,7 @@ struct is_same_mapping_reply
struct thread_info struct thread_info
{ {
timeout_t start_time;
thread_id_t tid; thread_id_t tid;
int base_priority; int base_priority;
int current_priority; int current_priority;
...@@ -6654,7 +6655,7 @@ union generic_reply ...@@ -6654,7 +6655,7 @@ union generic_reply
/* ### protocol_version begin ### */ /* ### protocol_version begin ### */
#define SERVER_PROTOCOL_VERSION 619 #define SERVER_PROTOCOL_VERSION 620
/* ### protocol_version end ### */ /* ### protocol_version end ### */
......
...@@ -1850,6 +1850,7 @@ DECL_HANDLER(list_processes) ...@@ -1850,6 +1850,7 @@ DECL_HANDLER(list_processes)
{ {
struct thread_info *thread_info = (struct thread_info *)(buffer + pos); struct thread_info *thread_info = (struct thread_info *)(buffer + pos);
thread_info->start_time = thread->creation_time;
thread_info->tid = thread->id; thread_info->tid = thread->id;
thread_info->base_priority = thread->priority; thread_info->base_priority = thread->priority;
thread_info->current_priority = thread->priority; /* FIXME */ thread_info->current_priority = thread->priority; /* FIXME */
......
...@@ -1862,6 +1862,7 @@ enum char_info_mode ...@@ -1862,6 +1862,7 @@ enum char_info_mode
struct thread_info struct thread_info
{ {
timeout_t start_time;
thread_id_t tid; thread_id_t tid;
int base_priority; int base_priority;
int current_priority; int current_priority;
......
...@@ -1128,7 +1128,8 @@ static void dump_varargs_process_info( const char *prefix, data_size_t size ) ...@@ -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); const struct thread_info *thread = (const struct thread_info *)((const char *)cur_data + pos);
if (size - pos < sizeof(*thread)) break; if (size - pos < sizeof(*thread)) break;
if (i) fputc( ',', stderr ); 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 ); thread->tid, thread->base_priority, thread->current_priority, thread->unix_tid );
pos += sizeof(*thread); pos += sizeof(*thread);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment