Merge pull request #397 from xen2/llvm_sqrt_abs
[mono.git] / mono / metadata / sgen-os-win32.c
index 43e8eef01aab38d7e95def2d046be002f65aa6ac..664fc548770996ade1342cdb411b75ec0a415227 100644 (file)
@@ -91,6 +91,9 @@ sgen_thread_handshake (BOOL suspend)
        int count = 0;
 
        FOREACH_THREAD_SAFE (info) {
+               if (info->joined_stw == suspend)
+                       continue;
+               info->joined_stw = suspend;
                if (info == current)
                        continue;
                if (info->gc_disabled)
@@ -108,7 +111,6 @@ sgen_thread_handshake (BOOL suspend)
                        if (!sgen_resume_thread (info))
                                continue;
                }
-
                ++count;
        } END_FOREACH_THREAD_SAFE
        return count;