summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2021-12-03 08:15:21 +0300
committerIvan Maidanski <ivmai@mail.ru>2021-12-03 08:15:53 +0300
commitc5625054cf156ac0ba851ab31cfd0eeb0501f501 (patch)
tree80a56d2c15e5351b1d5aa1bcd5760278f1412783
parent2ca78fcd59b33a90fd85cbcac7e6d0b5dd82bbdc (diff)
downloadbdwgc-c5625054cf156ac0ba851ab31cfd0eeb0501f501.tar.gz
Fix GC_allocate_ml incorrect cleanup in GC_deinit if pthreads (MinGW)
(fix of commit 72ba00903) Issue #397 (bdwgc). * misc.c [GC_WIN32_THREADS && (MSWIN32 || MSWINCE)] (GC_deinit): Do not call DeleteCriticalSection(&GC_allocate_ml) if GC_PTHREADS.
-rw-r--r--misc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/misc.c b/misc.c
index 8bf27ce6..2ef86cf2 100644
--- a/misc.c
+++ b/misc.c
@@ -1472,7 +1472,9 @@ GC_API void GC_CALL GC_enable_incremental(void)
# if !defined(CONSOLE_LOG) || defined(MSWINCE)
DeleteCriticalSection(&GC_write_cs);
# endif
- DeleteCriticalSection(&GC_allocate_ml);
+# ifndef GC_PTHREADS
+ DeleteCriticalSection(&GC_allocate_ml);
+# endif
# endif
}
}