X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Futils%2Fmono-threads.c;h=1919a00bc965d421efb0042e02ddfc4bd98ffb40;hb=56ad07531d611d0957134c6d60885f1f8b62845f;hp=b6e70329c96dc4c6f5660c3d071c3b37f8cde78a;hpb=2538a352f4ff2bb2636491aa1bb82ce4d03ab80f;p=mono.git diff --git a/mono/utils/mono-threads.c b/mono/utils/mono-threads.c index b6e70329c96..1919a00bc96 100644 --- a/mono/utils/mono-threads.c +++ b/mono/utils/mono-threads.c @@ -796,12 +796,6 @@ mono_thread_info_begin_resume (MonoThreadInfo *info) return mono_thread_info_core_resume (info); } -gboolean -mono_thread_info_check_suspend_result (MonoThreadInfo *info) -{ - return check_async_suspend (info); -} - /* FIXME fix cardtable WB to be out of line and check with the runtime if the target is not the WB trampoline. Another option is to encode wb ranges in MonoJitInfo, but that is somewhat hard. @@ -888,6 +882,8 @@ suspend_sync (MonoNativeThreadId tid, gboolean interrupt_kernel) mono_threads_wait_pending_operations (); if (!check_async_suspend (info)) { + mono_thread_info_core_resume (info); + mono_threads_wait_pending_operations (); mono_hazard_pointer_clear (hp, 1); return NULL; } @@ -1197,7 +1193,7 @@ mono_thread_info_sleep (guint32 ms, gboolean *alerted) if (alerted) return sleep_interruptable (ms, alerted); - MONO_PREPARE_BLOCKING; + MONO_ENTER_GC_SAFE; if (ms == INFINITE) { do { @@ -1242,7 +1238,7 @@ mono_thread_info_sleep (guint32 ms, gboolean *alerted) #endif /* __linux__ */ } - MONO_FINISH_BLOCKING; + MONO_EXIT_GC_SAFE; return 0; } @@ -1250,9 +1246,9 @@ mono_thread_info_sleep (guint32 ms, gboolean *alerted) gint mono_thread_info_usleep (guint64 us) { - MONO_PREPARE_BLOCKING; + MONO_ENTER_GC_SAFE; g_usleep (us); - MONO_FINISH_BLOCKING; + MONO_EXIT_GC_SAFE; return 0; } @@ -1314,12 +1310,6 @@ mono_threads_open_thread_handle (HANDLE handle, MonoNativeThreadId tid) return mono_threads_core_open_thread_handle (handle, tid); } -void -mono_thread_info_set_name (MonoNativeThreadId tid, const char *name) -{ - mono_threads_core_set_name (tid, name); -} - #define INTERRUPT_STATE ((MonoThreadInfoInterruptToken*) (size_t) -1) struct _MonoThreadInfoInterruptToken {