#include <mono/utils/mono-threads-coop.h>
#include <mono/utils/mono-threads-api.h>
#include <mono/utils/checked-build.h>
+#include <mono/utils/mono-threads-debug.h>
#ifdef TARGET_OSX
#include <mono/utils/mach-support.h>
stack = mono_native_tls_get_value (coop_reset_count_stack_key);
if (!stack || 0 == stack->len)
- mono_fatal_with_history ("Received cookie %p but found no stack at all, %x\n", received_cookie);
+ mono_fatal_with_history ("Received cookie %p but found no stack at all\n", received_cookie);
expected_cookie = g_array_index (stack, gpointer, stack->len - 1);
stack->len --;
/* commit the saved state and notify others if needed */
switch (mono_threads_transition_state_poll (info)) {
case SelfSuspendResumed:
- return;
+ break;
case SelfSuspendWait:
mono_thread_info_wait_for_resume (info);
break;
mono_thread_info_wait_for_resume (info);
break;
}
+
+ if (info->async_target) {
+ info->async_target (info->user_data);
+ info->async_target = NULL;
+ info->user_data = NULL;
+ }
}
static volatile gpointer* dummy_global;
default:
g_error ("Unknown thread state");
}
+
+ if (info->async_target) {
+ info->async_target (info->user_data);
+ info->async_target = NULL;
+ info->user_data = NULL;
+ }
}
void
g_error ("Unknown thread state");
}
+ if (info->async_target) {
+ info->async_target (info->user_data);
+ info->async_target = NULL;
+ info->user_data = NULL;
+ }
+
return info;
}