#include <sys/stat.h>
#include <sys/un.h>
#include <netinet/in.h>
-#include <sys/types.h>
-#include <sys/stat.h>
#include <fcntl.h>
#include <inttypes.h>
#include <pwd.h>
#include <mono/utils/mono-threads.h>
#include "attach.h"
+#include <mono/utils/w32api.h>
+
/*
* This module enables other processes to attach to a running mono process and
* load agent assemblies.
static char *server_uri;
-static HANDLE receiver_thread_handle;
+static MonoThreadHandle *receiver_thread_handle;
static gboolean stop_receiver_thread;
/* Wait for the receiver thread to exit */
if (receiver_thread_handle)
- WaitForSingleObjectEx (receiver_thread_handle, 0, FALSE);
+ mono_thread_info_wait_one_handle (receiver_thread_handle, 0, FALSE);
}
static int
printf ("attach: Connected.\n");
MonoThread *thread = mono_thread_attach (mono_get_root_domain ());
- mono_thread_set_name_internal (thread->internal_thread, mono_string_new (mono_get_root_domain (), "Attach receiver"), TRUE, &error);
+ mono_thread_set_name_internal (thread->internal_thread, mono_string_new (mono_get_root_domain (), "Attach receiver"), TRUE, FALSE, &error);
mono_error_assert_ok (&error);
/* Ask the runtime to not abort this thread */
//mono_thread_current ()->flags |= MONO_THREAD_FLAG_DONT_MANAGE;