*dummy = NULL;
/* mono_thread_attach put the thread in RUNNING mode from STARTING, but we need to
* return the right cookie. */
- return mono_threads_enter_gc_unsafe_region_cookie (mono_thread_info_current ());
+ return mono_threads_enter_gc_unsafe_region_cookie ();
} else {
*dummy = orig;
/* thread state (BLOCKING|RUNNING) -> RUNNING */
}
gpointer
-mono_threads_enter_gc_unsafe_region_cookie (MonoThreadInfo *info)
+mono_threads_enter_gc_unsafe_region_cookie (void)
{
+ MonoThreadInfo *info;
+
g_assert (mono_threads_is_coop_enabled ());
+ info = mono_thread_info_current_unchecked ();
+
+ check_info (info, "enter (cookie)", "unsafe");
+
#ifdef ENABLE_CHECKED_BUILD_GC
if (mono_check_mode_enabled (MONO_CHECK_MODE_GC))
coop_tls_push (info);
MonoThreadUnwindState* mono_thread_info_get_suspend_state (THREAD_INFO_TYPE *info);
gpointer
-mono_threads_enter_gc_unsafe_region_cookie (THREAD_INFO_TYPE *info);
+mono_threads_enter_gc_unsafe_region_cookie (void);
void mono_thread_info_wait_for_resume (THREAD_INFO_TYPE *info);