X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=libgc%2Fwin32_threads.c;h=a9569c83f00e4badf914f06ef241abfab210fb42;hb=83569e1ef07325ec30b00d3e2b955718f210e608;hp=87944dc375ff986313a60288a9ca1eec8691f0dd;hpb=b5cfba1835f2ba823796f825410e0062b7e4c9a3;p=mono.git diff --git a/libgc/win32_threads.c b/libgc/win32_threads.c index 87944dc375f..a9569c83f00 100644 --- a/libgc/win32_threads.c +++ b/libgc/win32_threads.c @@ -283,8 +283,15 @@ void GC_stop_world() # endif continue; } - if (SuspendThread(thread_table[i].handle) == (DWORD)-1) - ABORT("SuspendThread failed"); + if (SuspendThread(thread_table[i].handle) == (DWORD)-1) { + thread_table[i].stack_base = 0; /* prevent stack from being pushed */ +# ifndef CYGWIN32 + /* this breaks pthread_join on Cygwin, which is guaranteed to */ + /* only see user pthreads */ + thread_table[i].in_use = FALSE; + CloseHandle(thread_table[i].handle); +# endif + } # endif thread_table[i].suspended = TRUE; }