mono_runtime_run_main_checked (method, argc, argv, error);
mono_error_raise_exception_deprecated (error); /* OK, triggers unhandled exn handler */
- mono_thread_manage ();
+ mono_thread_manage_internal ();
mono_runtime_quit ();
#include "object.h"
#include "assembly-internals.h"
#include "external-only.h"
+#include "threads.h"
+#include "threads-types.h"
/**
* mono_gchandle_new:
return;
MONO_EXTERNAL_ONLY_GC_UNSAFE_VOID (mono_assembly_name_free_internal (aname));
}
+
+/**
+ * mono_thread_manage:
+ *
+ */
+void
+mono_thread_manage (void)
+{
+ MONO_EXTERNAL_ONLY_GC_UNSAFE_VOID (mono_thread_manage_internal ());
+}
mono_thread_create_checked (domain, mfunc, margs, error);
mono_error_assert_ok (error);
- mono_thread_manage ();
+ mono_thread_manage_internal ();
MONO_EXIT_GC_UNSAFE;
}
}
#endif
+void
+mono_thread_manage_internal (void);
+
/* Data owned by a MonoInternalThread that must live until both the finalizer
* for MonoInternalThread has run, and the underlying machine thread has
* detached.
}
/**
- * mono_thread_manage:
+ * mono_thread_manage_internal:
*/
void
-mono_thread_manage (void)
+mono_thread_manage_internal (void)
{
+ MONO_REQ_GC_UNSAFE_MODE;
+
struct wait_data wait_data;
struct wait_data *wait = &wait_data;
MONO_API void mono_thread_init (MonoThreadStartCB start_cb,
MonoThreadAttachCB attach_cb);
MONO_API void mono_thread_cleanup (void);
-MONO_API void mono_thread_manage(void);
+MONO_API MONO_RT_EXTERNAL_ONLY
+void mono_thread_manage(void);
MONO_API MonoThread *mono_thread_current (void);
mono_thread_create_checked (mono_domain_get (), (gpointer)compile_all_methods_thread_main, &args, error);
mono_error_assert_ok (error);
- mono_thread_manage ();
+ mono_thread_manage_internal ();
}
/**
main_args.opts = opt;
main_args.aot_options = aot_options;
main_thread_handler (&main_args);
- mono_thread_manage ();
+ mono_thread_manage_internal ();
mini_cleanup (domain);
mono_jit_cleanup (MonoDomain *domain)
{
MONO_ENTER_GC_UNSAFE;
- mono_thread_manage ();
+ mono_thread_manage_internal ();
mini_cleanup (domain);
MONO_EXIT_GC_UNSAFE;