]> granicus.if.org Git - gc/commit
Do not hold GC_fault_handler_lock when in Sleep (Win32)
authorIvan Maidanski <ivmai@mail.ru>
Thu, 3 Oct 2019 21:38:28 +0000 (00:38 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 3 Oct 2019 21:38:28 +0000 (00:38 +0300)
commit47873be17352b194bfd42731531fcf6ee68e64dc
tree784b329587224683c46b9c38604663dab8b36a6b
parent14deadaddbf84caf4e9a31eb9dfeb3c03e95a599
Do not hold GC_fault_handler_lock when in Sleep (Win32)
(fix of commits 0c0e4cd0b449eda034)

Also, reduce a period between GetExitCodeThread and SuspendThread.

* win32_threads.c [DEBUG_THREADS] (GC_suspend): Call GC_log_printf()
before UNPROTECT_THREAD().
* win32_threads.c [DEBUG_THREADS && !MSWINCE] (GC_suspend): Call
GC_acquire_dirty_lock() before GetExitCodeThread(); call
GC_release_dirty_lock() immediately if GetExitCodeThread() failed.
* win32_threads.c [MSWINCE || RETRY_GET_THREAD_CONTEXT] (GC_suspend):
Wrap Sleep() call with GC_release/acquire_dirty_lock().
win32_threads.c