Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
authorPaolo Molaro <lupus@oddwiz.org>
Mon, 20 Dec 2004 11:16:22 +0000 (11:16 -0000)
committerPaolo Molaro <lupus@oddwiz.org>
Mon, 20 Dec 2004 11:16:22 +0000 (11:16 -0000)
* object-internals.h, threads.c, domain.c: add accessors for
the MonoThread and MonoDomain tls keys.

svn path=/trunk/mono/; revision=37963

mono/metadata/ChangeLog
mono/metadata/domain.c
mono/metadata/object-internals.h
mono/metadata/threads.c

index 4c9437cfec1e39799587dba556bf1a3a893e21c1..2187efd478fed0731cde57d28541fb56c1233117 100644 (file)
@@ -1,3 +1,9 @@
+
+Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
+
+       * object-internals.h, threads.c, domain.c: add accessors for
+       the MonoThread and MonoDomain tls keys.
+
 2004-12-18  Martin Baulig  <martin@ximian.com>
 
        * class.c (inflate_generic_type): If we're inflating a generic
index 8fd877d86d8730e89259c469c02bca91797db560..bea41e5ac94e84c2ba18e774046ae92fd810ca18 100644 (file)
@@ -98,6 +98,12 @@ get_runtime_from_exe (const char *exe_file);
 static RuntimeInfo*
 get_runtime_by_version (const char *version);
 
+guint32
+mono_domain_get_tls_key (void)
+{
+       return appdomain_thread_id;
+}
+
 static MonoJitInfoTable *
 mono_jit_info_table_new (void)
 {
index 7bffc4b993f37be5e55129cf856c6370e424d932..06381200d661569d43726eae3dcebe8b77f21021 100644 (file)
@@ -411,6 +411,12 @@ mono_install_free_method    (MonoFreeMethodFunc func);
 void
 mono_type_initialization_init (void);
 
+guint32
+mono_thread_get_tls_key    (void);
+
+guint32
+mono_dmoain_get_tls_key    (void);
+
 /* Reflection and Reflection.Emit support */
 
 /*
index fe2757f3706ebe49d16bceb2c6949840a6d50637..04d9037c8c366a5d4676c4d122f287e169fb6273 100644 (file)
@@ -127,6 +127,11 @@ static CRITICAL_SECTION interruption_mutex;
 /* global count of thread interruptions requested */
 static gint32 thread_interruption_requested = 0;
 
+guint32
+mono_thread_get_tls_key (void)
+{
+       return current_object_key;
+}
 
 /* handle_store() and handle_remove() manage the array of threads that
  * still need to be waited for when the main thread exits.