[wasm] Add threading, dl and hwcap support for wasm.
[mono.git] / mono / utils / mono-threads.h
index fb5fb65f8995aada6f07cb928be9569c5ae11ccc..ffa9de63a66e5468d8cd5fe58989202cb73755b1 100644 (file)
@@ -109,7 +109,9 @@ and reduce the number of casts drastically.
 /* If this is defined, use the signals backed on Mach. Debug only as signals can't be made usable on OSX. */
 // #define USE_SIGNALS_ON_MACH
 
-#if defined (_POSIX_VERSION)
+#ifdef HOST_WASM
+#define USE_WASM_BACKEND
+#elif defined (_POSIX_VERSION)
 #if defined (__MACH__) && !defined (USE_SIGNALS_ON_MACH)
 #define USE_MACH_BACKEND
 #else
@@ -222,6 +224,12 @@ typedef struct {
 
        /* GCHandle to MonoInternalThread */
        guint32 internal_thread_gchandle;
+
+       /*
+        * Used by the sampling code in mini-posix.c to ensure that a thread has
+        * handled a sampling signal before sending another one.
+        */
+       gint32 profiler_signal_ack;
 } MonoThreadInfo;
 
 typedef struct {