You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against 262e4ab9e0eeb126dde5cb4cba13fbf7f1d1cef0.
This commit is contained in:
@@ -1,92 +0,0 @@
|
||||
From 11ce8824189ece2741a98c932b22ac7ccf2f4388 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Thu, 9 Mar 2017 00:00:46 +0100
|
||||
Subject: [PATCH] ntdll: Set correct thread creation time for
|
||||
SystemProcessInformation in NtQuerySystemInformation.
|
||||
|
||||
---
|
||||
dlls/ntdll/unix/system.c | 4 +++-
|
||||
server/protocol.def | 1 +
|
||||
server/snapshot.c | 13 +++++++------
|
||||
server/thread.h | 1 +
|
||||
4 files changed, 12 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c
|
||||
index 7045bc1550b..3d37578b34a 100644
|
||||
--- a/dlls/ntdll/unix/system.c
|
||||
+++ b/dlls/ntdll/unix/system.c
|
||||
@@ -2162,6 +2162,7 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class,
|
||||
while (ret == STATUS_SUCCESS)
|
||||
{
|
||||
int unix_tid, pid, tid, base_pri, delta_pri;
|
||||
+ timeout_t creation_time;
|
||||
SERVER_START_REQ( next_thread )
|
||||
{
|
||||
req->handle = wine_server_obj_handle( handle );
|
||||
@@ -2173,6 +2174,7 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class,
|
||||
tid = reply->tid;
|
||||
base_pri = reply->base_pri;
|
||||
delta_pri = reply->delta_pri;
|
||||
+ creation_time = reply->creation_time;
|
||||
j++;
|
||||
}
|
||||
}
|
||||
@@ -2184,7 +2186,7 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class,
|
||||
{
|
||||
memset(&spi->ti[i], 0, sizeof(spi->ti));
|
||||
|
||||
- spi->ti[i].CreateTime.QuadPart = 0xdeadbeef;
|
||||
+ spi->ti[i].CreateTime.QuadPart = creation_time;
|
||||
spi->ti[i].ClientId.UniqueProcess = UlongToHandle(pid);
|
||||
spi->ti[i].ClientId.UniqueThread = UlongToHandle(tid);
|
||||
spi->ti[i].dwCurrentPriority = base_pri + delta_pri;
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index 38079f23daf..89a0332691c 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -1911,6 +1911,7 @@ enum char_info_mode
|
||||
int count; /* thread usage count */
|
||||
process_id_t pid; /* process id */
|
||||
thread_id_t tid; /* thread id */
|
||||
+ timeout_t creation_time; /* thread creation time */
|
||||
int base_pri; /* base priority */
|
||||
int delta_pri; /* delta priority */
|
||||
int unix_tid; /* thread native pid */
|
||||
diff --git a/server/snapshot.c b/server/snapshot.c
|
||||
index bdceaef5302..fe25e07e02a 100644
|
||||
--- a/server/snapshot.c
|
||||
+++ b/server/snapshot.c
|
||||
@@ -145,12 +145,13 @@ static int snapshot_next_thread( struct snapshot *snapshot, struct next_thread_r
|
||||
return 0;
|
||||
}
|
||||
ptr = &snapshot->threads[snapshot->thread_pos++];
|
||||
- reply->count = ptr->count;
|
||||
- reply->pid = get_process_id( ptr->thread->process );
|
||||
- reply->tid = get_thread_id( ptr->thread );
|
||||
- reply->base_pri = ptr->priority;
|
||||
- reply->delta_pri = 0; /* FIXME */
|
||||
- reply->unix_tid = ptr->thread->unix_tid;
|
||||
+ reply->count = ptr->count;
|
||||
+ reply->pid = get_process_id( ptr->thread->process );
|
||||
+ reply->tid = get_thread_id( ptr->thread );
|
||||
+ reply->creation_time = get_thread_creation_time( ptr->thread );
|
||||
+ reply->base_pri = ptr->priority;
|
||||
+ reply->delta_pri = 0; /* FIXME */
|
||||
+ reply->unix_tid = ptr->thread->unix_tid;
|
||||
return 1;
|
||||
}
|
||||
|
||||
diff --git a/server/thread.h b/server/thread.h
|
||||
index 5d12d24dd89..43b17534693 100644
|
||||
--- a/server/thread.h
|
||||
+++ b/server/thread.h
|
||||
@@ -150,5 +150,6 @@ static inline void clear_error(void) { set_error(0); }
|
||||
static inline void set_win32_error( unsigned int err ) { set_error( 0xc0010000 | err ); }
|
||||
|
||||
static inline thread_id_t get_thread_id( struct thread *thread ) { return thread->id; }
|
||||
+static inline timeout_t get_thread_creation_time( struct thread *thread ) { return thread->creation_time; }
|
||||
|
||||
#endif /* __WINE_SERVER_THREAD_H */
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
From 72c4b3f95ad4c8a8ed31ad61c3678cf7d534fba9 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:32:59 +0100
|
||||
Subject: [PATCH] ntdll: Set process start time.
|
||||
|
||||
---
|
||||
dlls/ntdll/unix/system.c | 1 +
|
||||
server/protocol.def | 1 +
|
||||
server/snapshot.c | 15 ++++++++-------
|
||||
3 files changed, 10 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/system.c b/dlls/ntdll/unix/system.c
|
||||
index f137ccf97a7..94915bd9e47 100644
|
||||
--- a/dlls/ntdll/unix/system.c
|
||||
+++ b/dlls/ntdll/unix/system.c
|
||||
@@ -2137,6 +2137,7 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class,
|
||||
spi->UniqueProcessId = UlongToHandle(reply->pid);
|
||||
spi->ParentProcessId = UlongToHandle(reply->ppid);
|
||||
spi->HandleCount = reply->handles;
|
||||
+ spi->CreationTime.QuadPart = reply->start_time;
|
||||
|
||||
/* spi->ti will be set later on */
|
||||
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index 89a0332691c..b29e014958e 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -1899,6 +1899,7 @@ enum char_info_mode
|
||||
int priority; /* process priority */
|
||||
int handles; /* number of handles */
|
||||
int unix_pid; /* Unix pid */
|
||||
+ timeout_t start_time; /* start time */
|
||||
VARARG(filename,unicode_str); /* file name of main exe */
|
||||
@END
|
||||
|
||||
diff --git a/server/snapshot.c b/server/snapshot.c
|
||||
index fe25e07e02a..b6b790e21bd 100644
|
||||
--- a/server/snapshot.c
|
||||
+++ b/server/snapshot.c
|
||||
@@ -114,13 +114,14 @@ static int snapshot_next_process( struct snapshot *snapshot, struct next_process
|
||||
return 0;
|
||||
}
|
||||
ptr = &snapshot->processes[snapshot->process_pos++];
|
||||
- reply->count = ptr->count;
|
||||
- reply->pid = get_process_id( ptr->process );
|
||||
- reply->ppid = ptr->process->parent_id;
|
||||
- reply->threads = ptr->threads;
|
||||
- reply->priority = ptr->priority;
|
||||
- reply->handles = ptr->handles;
|
||||
- reply->unix_pid = ptr->process->unix_pid;
|
||||
+ reply->count = ptr->count;
|
||||
+ reply->pid = get_process_id( ptr->process );
|
||||
+ reply->ppid = ptr->process->parent_id;
|
||||
+ reply->threads = ptr->threads;
|
||||
+ reply->priority = ptr->priority;
|
||||
+ reply->handles = ptr->handles;
|
||||
+ reply->unix_pid = ptr->process->unix_pid;
|
||||
+ reply->start_time = ptr->process->start_time;
|
||||
if ((exe_module = get_process_exe_module( ptr->process )) && exe_module->filename)
|
||||
{
|
||||
data_size_t len = min( exe_module->namelen, get_reply_max_size() );
|
||||
--
|
||||
2.27.0
|
||||
|
||||
Reference in New Issue
Block a user