This global var is meant to be used by JIT'd code to efficiently implement polling.
#ifdef USE_COOP_BACKEND
+volatile size_t mono_polling_required;
void
mono_threads_state_poll (void)
//See the above for what's wrong here.
}
+void
+mono_threads_core_begin_global_suspend (void)
+{
+ mono_polling_required = 1;
+}
+
+void
+mono_threads_core_end_global_suspend (void)
+{
+ mono_polling_required = 0;
+}
+
#endif
\ No newline at end of file
void* mono_threads_try_prepare_blocking (void);
void mono_threads_finish_try_blocking (void* cookie);
+/* JIT specific interface */
+extern volatile size_t mono_polling_required ;
+
#else
#define MONO_SUSPEND_CHECK do { } while (0);
{
}
+void
+mono_threads_core_begin_global_suspend (void)
+{
+}
+
+void
+mono_threads_core_end_global_suspend (void)
+{
+}
+
#endif /*defined (USE_POSIX_BACKEND)*/
#endif
{
}
+void
+mono_threads_core_begin_global_suspend (void)
+{
+}
+
+void
+mono_threads_core_end_global_suspend (void)
+{
+}
+
#endif
{
g_assert (pending_suspends == 0);
THREADS_SUSPEND_DEBUG ("------ BEGIN GLOBAL OP sp %d rp %d wd %d po %d\n", suspend_posts, resume_posts, waits_done, pending_ops);
+ mono_threads_core_begin_global_suspend ();
}
void
{
g_assert (pending_suspends == 0);
THREADS_SUSPEND_DEBUG ("------ END GLOBAL OP sp %d rp %d wd %d po %d\n", suspend_posts, resume_posts, waits_done, pending_ops);
+ mono_threads_core_end_global_suspend ();
}
static void
HANDLE mono_threads_core_open_thread_handle (HANDLE handle, MonoNativeThreadId tid);
void mono_threads_core_set_name (MonoNativeThreadId tid, const char *name);
+void mono_threads_core_begin_global_suspend (void);
+void mono_threads_core_end_global_suspend (void);
+
/* Internal API between mono-threads and its backends. */
/* Backend functions - a backend must implement all of the following */