Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Unity-Technologies/bdwgc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2017-09-26 01:12:30 +0300
committerIvan Maidanski <ivmai@mail.ru>2017-09-26 01:12:30 +0300
commitb785014a6f8d6d6afb3521fd235e125c43e6028b (patch)
treeb4bcd257e18ae1aa28dcaf1b240ea9e44a8cf464 /win32_threads.c
parentf487f27c72ab054e8f9101c0696c24836a18eb9b (diff)
Fix double lock in pthread_detach (Cygwin, winpthreads)
* win32_threads.c [GC_PTHREADS] (GC_pthread_detach): Do not hold the allocation lock when GC_lookup_pthread is invoked.
Diffstat (limited to 'win32_threads.c')
-rw-r--r--win32_threads.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/win32_threads.c b/win32_threads.c
index a99eec1a..24f16dbe 100644
--- a/win32_threads.c
+++ b/win32_threads.c
@@ -2715,9 +2715,7 @@ GC_INNER void GC_thr_init(void)
DCL_LOCK_STATE;
GC_ASSERT(!GC_win32_dll_threads);
- LOCK();
t = GC_lookup_pthread(thread);
- UNLOCK();
result = pthread_detach(thread);
if (result == 0) {
if (NULL == t) ABORT("Thread not registered");