-void
-mono_threads_platform_set_exited (MonoThreadInfo *info)
-{
- MonoW32HandleThread *thread_data;
- gpointer mutex_handle;
- int i, thr_ret;
- pid_t pid;
- pthread_t tid;
-
- if (!info->handle || mono_w32handle_issignalled (info->handle) || mono_w32handle_get_type (info->handle) == MONO_W32HANDLE_UNUSED) {
- /* We must have already deliberately finished
- * with this thread, so don't do any more now */
- return;
- }
-
- if (!mono_w32handle_lookup (info->handle, MONO_W32HANDLE_THREAD, (gpointer*) &thread_data))
- g_error ("unknown thread handle %p", info->handle);
-
- pid = wapi_getpid ();
- tid = pthread_self ();
-
- for (i = 0; i < thread_data->owned_mutexes->len; i++) {
- mutex_handle = g_ptr_array_index (thread_data->owned_mutexes, i);
- wapi_mutex_abandon (mutex_handle, pid, tid);
- mono_thread_info_disown_mutex (info, mutex_handle);
- }
-
- g_ptr_array_free (thread_data->owned_mutexes, TRUE);
-
- thr_ret = mono_w32handle_lock_handle (info->handle);
- g_assert (thr_ret == 0);
-
- mono_w32handle_set_signal_state (info->handle, TRUE, TRUE);
-
- thr_ret = mono_w32handle_unlock_handle (info->handle);
- g_assert (thr_ret == 0);
-
- /* The thread is no longer active, so unref it */
- mono_w32handle_unref (info->handle);
-
- info->handle = NULL;
-}
-
-void
-mono_threads_platform_describe (MonoThreadInfo *info, GString *text)
-{
- MonoW32HandleThread *thread_data;
- int i;
-
- g_assert (info->handle);
-
- if (!mono_w32handle_lookup (info->handle, MONO_W32HANDLE_THREAD, (gpointer*) &thread_data))
- g_error ("unknown thread handle %p", info->handle);
-
- g_string_append_printf (text, "thread handle %p state : ", info->handle);
-
- mono_thread_info_describe_interrupt_token (info, text);
-
- g_string_append_printf (text, ", owns (");
- for (i = 0; i < thread_data->owned_mutexes->len; i++)
- g_string_append_printf (text, i > 0 ? ", %p" : "%p", g_ptr_array_index (thread_data->owned_mutexes, i));
- g_string_append_printf (text, ")");
-}
-
-void
-mono_threads_platform_own_mutex (MonoThreadInfo *info, gpointer mutex_handle)