Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorLudovic Henry <ludovic@xamarin.com>2017-06-20 03:35:54 +0300
committerGitHub <noreply@github.com>2017-06-20 03:35:54 +0300
commita08574bf9e4f27e3187a3f6edf7d99d32c28ad6c (patch)
tree2e754359624756f649d212e5047bf30de49001b4 /tools
parent3765f987d5c6d5ac4d11f1a3908797f420770dc0 (diff)
[threads] Store MonoInternalThread in MonoThreadInfo for use when detaching (#5058)
* [threads] Make mono_thread_attach_full static * [threads] Remove prefix on MonoThreadInfoCallbacks callbacks * [threads] Rename mono_threads*_init functions to mono_thread_info*_init * [threads] Remove dead method mono_runtime_is_critical_method * [threads] Move MonoThreadInfoCallbacks to metadata/threads * [threads] Store MonoInternalThread in MonoThreadInfo for use when detaching When the native thread would exit, the TLS keys are destroyed. There is a TLS destructor for MonoThreadInfo, but not for MonoInternalThread. If MonoInternalThread is destroyed before MonoThreadInfo, then MonoThreadInfoCallbacks.thread_detach wouldn't successfully detach the current MonoInternalThread as mono_thread_internal_current would return NULL. This would lead to MonoInternalThread still laying around, while their corresponding MonoThreadInfo has already been destroyed. This fixes this problem, since we now rely on MonoThreadInfo to store the MonoInternalThread for detach.
Diffstat (limited to 'tools')
-rw-r--r--tools/pedump/pedump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/pedump/pedump.c b/tools/pedump/pedump.c
index 829cda2bdf1..5b76dfd19bd 100644
--- a/tools/pedump/pedump.c
+++ b/tools/pedump/pedump.c
@@ -671,7 +671,7 @@ main (int argc, char *argv [])
#ifndef HOST_WIN32
mono_w32handle_init ();
#endif
- mono_threads_runtime_init (&ticallbacks);
+ mono_thread_info_runtime_init (&ticallbacks);
mono_metadata_init ();
mono_images_init ();