#ifndef __MONO_THREADS_H__
#define __MONO_THREADS_H__
-#include <mono/utils/mono-semaphore.h>
+#include <mono/utils/mono-os-semaphore.h>
#include <mono/utils/mono-stack-unwinding.h>
#include <mono/utils/mono-linked-list-set.h>
-#include <mono/utils/mono-mutex.h>
#include <mono/utils/mono-tls.h>
#include <mono/utils/mono-threads-coop.h>
#include <mono/utils/mono-threads-api.h>
+#include <mono/utils/mono-coop-semaphore.h>
+
+#include <mono/io-layer/io-layer.h>
#include <glib.h>
#include <config.h>
gboolean create_suspended;
/* Semaphore used to implement CREATE_SUSPENDED */
- MonoSemType create_suspended_sem;
+ MonoCoopSem create_suspended_sem;
/*
* Values of TLS variables for this thread.
void *jit_data;
MonoThreadInfoInterruptToken *interrupt_token;
+
+ /* MonoHandleArena for coop handles */
+ gpointer handle_arena;
} MonoThreadInfo;
typedef struct {
THREAD_INFO_TYPE*
mono_thread_info_lookup (MonoNativeThreadId id);
-THREAD_INFO_TYPE*
-mono_thread_info_safe_suspend_sync (MonoNativeThreadId tid, gboolean interrupt_kernel);
-
gboolean
mono_thread_info_resume (MonoNativeThreadId tid);
gint
mono_thread_info_sleep (guint32 ms, gboolean *alerted);
+gint
+mono_thread_info_usleep (guint64 us);
+
gpointer
mono_thread_info_tls_get (THREAD_INFO_TYPE *info, MonoTlsKey key);
AsyncSuspendAlreadySuspended,
AsyncSuspendWait,
AsyncSuspendInitSuspend,
+ AsyncSuspendBlocking,
} MonoRequestAsyncSuspendResult;
typedef enum {
const char* mono_thread_state_name (int state);
gboolean mono_thread_info_in_critical_location (THREAD_INFO_TYPE *info);
-gboolean mono_thread_info_begin_suspend (THREAD_INFO_TYPE *info, gboolean interrupt_kernel);
+gboolean mono_thread_info_begin_suspend (THREAD_INFO_TYPE *info);
gboolean mono_thread_info_begin_resume (THREAD_INFO_TYPE *info);
gboolean