[sgen] Never directly pin objects on the M&S major heap.
[mono.git] / mono / metadata / attach.c
index 19956cc5acc953eda07a52714a7aeafe3e596d00..b14709aeabc85b89e7e42f4e39c9b2c6a0d01a89 100644 (file)
@@ -10,7 +10,7 @@
 #include <config.h>
 #include <glib.h>
 
-#ifdef PLATFORM_WIN32
+#ifdef HOST_WIN32
 #define DISABLE_ATTACH
 #endif
 #ifndef DISABLE_ATTACH
@@ -480,7 +480,7 @@ transport_start_receive (void)
        if (!listen_fd)
                return;
 
-       receiver_thread_handle = CreateThread (NULL, 0, receiver_thread, NULL, 0, &tid);
+       receiver_thread_handle = mono_create_thread (NULL, 0, receiver_thread, NULL, 0, &tid);
        g_assert (receiver_thread_handle);
 }
 
@@ -506,7 +506,7 @@ receiver_thread (void *arg)
                /* Ask the runtime to not abort this thread */
                //mono_thread_current ()->flags |= MONO_THREAD_FLAG_DONT_MANAGE;
                /* Ask the runtime to not wait for this thread */
-               mono_thread_current ()->state |= ThreadState_Background;
+               mono_thread_internal_current ()->state |= ThreadState_Background;
 
                while (TRUE) {
                        char *cmd, *agent_name, *agent_args;