Rebase against e0e3b6bc91f7db956e3a66f2938eea45d4055a39.

This commit is contained in:
Zebediah Figura
2020-07-07 17:59:50 -05:00
parent 21a97e1f88
commit b1765ff74e
28 changed files with 205 additions and 1491 deletions

View File

@@ -1,4 +1,4 @@
From a2401a21b78201f2310d571f8d66ac574dd0d830 Mon Sep 17 00:00:00 2001
From d05ac476a0ca682ecb7ae13aa9e578c94b71e3f8 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 12 Nov 2018 18:10:32 +0200
Subject: [PATCH] server: Do not signal violently terminated threads until they
@@ -27,10 +27,10 @@ Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2 files changed, 30 insertions(+), 3 deletions(-)
diff --git a/server/thread.c b/server/thread.c
index 1c0fbd4179b..f8962221d9a 100644
index 9b14174578e..2f32cb4b62e 100644
--- a/server/thread.c
+++ b/server/thread.c
@@ -203,6 +203,7 @@ static inline void init_thread_structure( struct thread *thread )
@@ -239,6 +239,7 @@ static inline void init_thread_structure( struct thread *thread )
thread->token = NULL;
thread->desc = NULL;
thread->desc_len = 0;
@@ -38,7 +38,7 @@ index 1c0fbd4179b..f8962221d9a 100644
thread->creation_time = current_time;
thread->exit_time = 0;
@@ -361,6 +362,7 @@ static void destroy_thread( struct object *obj )
@@ -430,6 +431,7 @@ static void destroy_thread( struct object *obj )
list_remove( &thread->entry );
cleanup_thread( thread );
release_object( thread->process );
@@ -46,7 +46,7 @@ index 1c0fbd4179b..f8962221d9a 100644
if (thread->id) free_ptid( thread->id );
if (thread->token) release_object( thread->token );
}
@@ -385,7 +387,7 @@ static struct object_type *thread_get_type( struct object *obj )
@@ -454,7 +456,7 @@ static struct object_type *thread_get_type( struct object *obj )
static int thread_signaled( struct object *obj, struct wait_queue_entry *entry )
{
struct thread *mythread = (struct thread *)obj;
@@ -55,7 +55,7 @@ index 1c0fbd4179b..f8962221d9a 100644
}
static unsigned int thread_map_access( struct object *obj, unsigned int access )
@@ -1171,6 +1173,26 @@ int thread_get_inflight_fd( struct thread *thread, int client )
@@ -1245,6 +1247,26 @@ int thread_get_inflight_fd( struct thread *thread, int client )
return -1;
}
@@ -82,7 +82,7 @@ index 1c0fbd4179b..f8962221d9a 100644
/* kill a thread on the spot */
void kill_thread( struct thread *thread, int violent_death )
{
@@ -1191,8 +1213,12 @@ void kill_thread( struct thread *thread, int violent_death )
@@ -1265,8 +1287,12 @@ void kill_thread( struct thread *thread, int violent_death )
kill_console_processes( thread, 0 );
debug_exit_thread( thread );
abandon_mutexes( thread );
@@ -98,17 +98,17 @@ index 1c0fbd4179b..f8962221d9a 100644
remove_process_thread( thread->process, thread );
release_object( thread );
diff --git a/server/thread.h b/server/thread.h
index 7957557b6cc..880419c5924 100644
index 650bc44628d..668cc4ebd79 100644
--- a/server/thread.h
+++ b/server/thread.h
@@ -90,6 +90,7 @@ struct thread
@@ -91,6 +91,7 @@ struct thread
struct list kernel_object; /* list of kernel object pointers */
data_size_t desc_len; /* thread description length in bytes */
WCHAR *desc; /* thread description string */
+ struct timeout_user *exit_poll; /* poll if the thread/process has exited already */
};
struct thread_snapshot
extern struct thread *current;
--
2.24.0
2.27.0