[dtrace] GC begin/end probes for SGen.
[mono.git] / mono / metadata / sgen-os-mach.c
index 56e0ffef0feb692f2ff5c1389e05f1797c3e9f7c..c99debf9943963949dc2487155a95d352db3fc32 100644 (file)
@@ -95,7 +95,7 @@ sgen_suspend_thread (SgenThreadInfo *info)
 
        /* Notify the JIT */
        if (mono_gc_get_gc_callbacks ()->thread_suspend_func)
-               mono_gc_get_gc_callbacks ()->thread_suspend_func (info->runtime_data, &ctx);
+               mono_gc_get_gc_callbacks ()->thread_suspend_func (info->runtime_data, &ctx, NULL);
 
        return TRUE;
 }
@@ -117,6 +117,8 @@ sgen_thread_handshake (BOOL suspend)
        int count = 0;
 
        FOREACH_THREAD_SAFE (info) {
+               if (info->joined_stw == suspend)
+                       continue;
                info->joined_stw = suspend;
 
                if (info == cur_thread || sgen_is_worker_thread (mono_thread_info_get_tid (info)))