[aot] Fix the emission of dwarf debug info.
[mono.git] / mono / metadata / attach.c
index 83b06dc6ff99249d68be869f85df6cff191e8085..0a053661b8e411892419e95a41ffa1bb3be6a0c0 100644 (file)
@@ -99,9 +99,9 @@ static gboolean stop_receiver_thread;
 
 static gboolean needs_to_start, started;
 
-#define agent_lock() EnterCriticalSection (&agent_mutex)
-#define agent_unlock() LeaveCriticalSection (&agent_mutex)
-static CRITICAL_SECTION agent_mutex;
+#define agent_lock() mono_mutex_lock (&agent_mutex)
+#define agent_unlock() mono_mutex_unlock (&agent_mutex)
+static mono_mutex_t agent_mutex;
 
 static void transport_connect (void);
 
@@ -193,7 +193,7 @@ mono_attach_parse_options (char *options)
 void
 mono_attach_init (void)
 {
-       InitializeCriticalSection (&agent_mutex);
+       mono_mutex_init_recursive (&agent_mutex);
 
        config.enabled = TRUE;
 }