#include <mono/metadata/runtime.h>
#include <mono/metadata/monitor.h>
#include <mono/metadata/threads-types.h>
-#include <mono/metadata/threadpool-ms.h>
+#include <mono/metadata/threadpool.h>
#include <mono/metadata/marshal.h>
#include <mono/utils/atomic.h>
mono_runtime_set_shutting_down ();
- /* This will kill the tp threads which cannot be suspended */
- mono_threadpool_ms_cleanup ();
-
/*TODO move the follow to here:
mono_thread_suspend_all_other_threads (); OR mono_thread_wait_all_other_threads
mono_runtime_init_tls (void)
{
mono_marshal_init_tls ();
- mono_thread_init_tls ();
}
+
+char*
+mono_runtime_get_aotid (void)
+{
+ int i;
+ guint8 aotid_sum = 0;
+ MonoDomain* domain = mono_domain_get ();
+
+ if (!domain->entry_assembly || !domain->entry_assembly->image)
+ return NULL;
+
+ guint8 (*aotid)[16] = &domain->entry_assembly->image->aotid;
+
+ for (i = 0; i < 16; ++i)
+ aotid_sum |= (*aotid)[i];
+
+ if (aotid_sum == 0)
+ return NULL;
+
+ return mono_guid_to_string ((guint8*) aotid);
+}
\ No newline at end of file