summaryrefslogtreecommitdiff
path: root/boehm-gc/misc.c
diff options
context:
space:
mode:
authormegacz <megacz@138bc75d-0d04-0410-961f-82ee72b054a4>2002-02-07 03:56:40 +0000
committermegacz <megacz@138bc75d-0d04-0410-961f-82ee72b054a4>2002-02-07 03:56:40 +0000
commitef8fa395ef96991797eaa5187476966522684d03 (patch)
tree6c3ed013c8e8ef078276d9712ba1ca29f2699f19 /boehm-gc/misc.c
parent2a8dfff3f974ba56056ce7f5ebc5737a6a3f5849 (diff)
downloadgcc-ef8fa395ef96991797eaa5187476966522684d03.tar.gz
2002-02-06 Adam Megacz <adam@xwt.org>
* boehm-gc/include/gc.h: (GC_CreateThread) This function is now exposed on all Win32 platforms. * boehm-gc/win32_threads.c: (GC_CreateThread) This now compiles on Win32; it invokes CreateThread() if GC is built as a DLL; otherwise it registers the thread. * boehm-gc/misc.c (GC_init): Initialize GC_allocate_ml in case libgcjgc was not built as a DLL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49563 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'boehm-gc/misc.c')
-rw-r--r--boehm-gc/misc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/boehm-gc/misc.c b/boehm-gc/misc.c
index 2bb93f3dd57..06d7085d06e 100644
--- a/boehm-gc/misc.c
+++ b/boehm-gc/misc.c
@@ -436,6 +436,11 @@ void GC_init()
DCL_LOCK_STATE;
DISABLE_SIGNALS();
+
+#ifdef MSWIN32
+ if (!GC_is_initialized) InitializeCriticalSection(&GC_allocate_ml);
+#endif /* MSWIN32 */
+
LOCK();
GC_init_inner();
UNLOCK();