[runtime] Add MonoError to mono_remote_class
[mono.git] / mono / metadata / runtime.c
index 7b14f436536eb13fb0b509a6c2645ccd816bcda8..fcd8782387635f0b44c57b60da57e779ab257c4c 100644 (file)
@@ -17,7 +17,7 @@
 #include <mono/metadata/runtime.h>
 #include <mono/metadata/monitor.h>
 #include <mono/metadata/threads-types.h>
-#include <mono/metadata/threadpool.h>
+#include <mono/metadata/threadpool-ms.h>
 #include <mono/metadata/marshal.h>
 #include <mono/utils/atomic.h>
 
@@ -81,11 +81,14 @@ mono_runtime_fire_process_exit_event (void)
 }
 
 
-/*
+/**
+ * mono_runtime_try_shutdown:
+ *
  * Try to initialize runtime shutdown.
+ *
  * After this call completes the thread pool will stop accepting new jobs and no further threads will be created.
  *
- * @return true if shutdown was initiated by this call or false is other thread beat this one
+ * Returns: TRUE if shutdown was initiated by this call or false is other thread beat this one.
  */
 gboolean
 mono_runtime_try_shutdown (void)
@@ -104,7 +107,7 @@ mono_runtime_try_shutdown (void)
        mono_runtime_set_shutting_down ();
 
        /* This will kill the tp threads which cannot be suspended */
-       mono_thread_pool_cleanup ();
+       mono_threadpool_ms_cleanup ();
 
        /*TODO move the follow to here:
        mono_thread_suspend_all_other_threads (); OR  mono_thread_wait_all_other_threads
@@ -119,8 +122,6 @@ mono_runtime_try_shutdown (void)
 gboolean
 mono_runtime_is_critical_method (MonoMethod *method)
 {
-       if (mono_monitor_is_il_fastpath_wrapper (method))
-               return TRUE;
        return FALSE;
 }
 
@@ -134,6 +135,5 @@ void
 mono_runtime_init_tls (void)
 {
        mono_marshal_init_tls ();
-       mono_thread_pool_init_tls ();
        mono_thread_init_tls ();
 }