X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmetadata%2Fprofiler.c;h=8323e3984cfcae0522a6c33690a0f7d3a77f1cee;hb=57cd4050c4c46d4e39717dadeae9516f147af7f6;hp=28851576d3122611a2afabcae0bf86b01e9b4d11;hpb=cc9fa96a3163b4ac0b2df0726c72963017d802d6;p=mono.git diff --git a/mono/metadata/profiler.c b/mono/metadata/profiler.c index 28851576d31..8323e3984cf 100644 --- a/mono/metadata/profiler.c +++ b/mono/metadata/profiler.c @@ -1434,6 +1434,8 @@ simple_shutdown (MonoProfiler *prof) char *str; gint32 see_shutdown_done; + mono_thread_attach(mono_get_root_domain()); + // Make sure we execute simple_shutdown only once see_shutdown_done = InterlockedExchange(& simple_shutdown_done, TRUE); if (see_shutdown_done)