static gsize WINAPI inner_start_thread (gpointer data) { CreateThreadData *thread_data; MonoThreadInfo *info; MonoThreadStart start_routine; gpointer start_routine_arg; guint32 start_routine_res; gint32 priority; gsize dummy; thread_data = (CreateThreadData*) data; g_assert (thread_data); start_routine = thread_data->start_routine; start_routine_arg = thread_data->start_routine_arg; priority = thread_data->priority; info = mono_thread_info_attach (&dummy); info->runtime_thread = TRUE; mono_threads_platform_set_priority (info, priority); thread_data->handle = mono_thread_info_duplicate_handle (info); mono_coop_sem_post (&thread_data->registered); if (InterlockedDecrement (&thread_data->ref) == 0) { mono_coop_sem_destroy (&thread_data->registered); g_free (thread_data); } /* thread_data is not valid anymore */ thread_data = NULL; /* Run the actual main function of the thread */ start_routine_res = start_routine (start_routine_arg); mono_threads_platform_exit (start_routine_res); g_assert_not_reached (); }
gboolean mono_thread_info_set_priority (MonoThreadInfo *info, MonoThreadPriority priority) { return mono_threads_platform_set_priority (info, priority); }
void mono_thread_info_set_priority (MonoThreadInfo *info, MonoThreadPriority priority) { mono_threads_platform_set_priority (info, priority); }