This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
WIN-07: boehm.cc patch to ensure that GC_allocate_ml gets initialized even if libgcjgc is not a DLL
- From: Adam Megacz <patches at lists dot megacz dot com>
- To: java-patches at gcc dot gnu dot org
- Date: 31 Jan 2002 18:36:28 -0800
- Subject: WIN-07: boehm.cc patch to ensure that GC_allocate_ml gets initialized even if libgcjgc is not a DLL
- Organization: Myself
2002-01-31 Adam Megacz <adam@xwt.org>
* boehm.cc (_Jv_InitGC): Initialize GC_allocate_ml in case
libgcjgc was not built as a DLL.
Index: boehm.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/boehm.cc,v
retrieving revision 1.32
diff -c -3 -p -u -r1.32 boehm.cc
cvs server: conflicting specifications of output style
--- boehm.cc 2001/12/19 02:45:20 1.32
+++ boehm.cc 2002/02/01 02:37:41
@@ -472,6 +472,12 @@ _Jv_InitGC (void)
int proc;
DCL_LOCK_STATE;
+#ifdef WIN32
+ // make sure GC_allocate_ml gets initialized, even if libgcjgc.a is
+ // statically linked.
+ InitializeCriticalSection(&GC_allocate_ml);
+#endif /* WIN32 */
+
DISABLE_SIGNALS ();
LOCK ();