WIN-31: boehm-gc don't do SEH in GCC
Adam Megacz
patches@lists.megacz.com
Wed Mar 6 17:54:00 GMT 2002
Ok to commit?
- a
2002-03-06 Adam Megacz <adam@xwt.org>
* win32_threads.c (thread_start): Don't attempt SEH with gcc.
* mark.c (GC_mark_some): Don't attempt SEH with gcc.
Index: win32_threads.c
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/win32_threads.c,v
retrieving revision 1.9
diff -u -r1.9 win32_threads.c
--- win32_threads.c 2002/02/25 04:04:43 1.9
+++ win32_threads.c 2002/03/07 01:09:44
@@ -447,16 +447,22 @@
/* Clear the thread entry even if we exit with an exception. */
/* This is probably pointless, since an uncaught exception is */
/* supposed to result in the process being killed. */
+#ifndef __GNUC__
__try {
+#endif /* __GNUC__ */
ret = args.start (args.param);
+#ifndef __GNUC__
} __finally {
+#endif /* __GNUC__ */
LOCK();
args.entry->stack = 0;
args.entry->in_use = FALSE;
/* cast away volatile qualifier */
BZERO((void *) &args.entry->context, sizeof(CONTEXT));
UNLOCK();
+#ifndef __GNUC__
}
+#endif /* __GNUC__ */
return ret;
}
Index: mark.c
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/mark.c,v
retrieving revision 1.12
diff -u -r1.12 mark.c
--- mark.c 2002/02/12 04:37:53 1.12
+++ mark.c 2002/03/07 01:09:44
@@ -264,7 +264,7 @@
GC_bool GC_mark_some(cold_gc_frame)
ptr_t cold_gc_frame;
{
-#ifdef MSWIN32
+#if defined(MSWIN32) && !defined(__GNUC__)
/* Windows 98 appears to asynchronously create and remove writable */
/* memory mappings, for reasons we haven't yet understood. Since */
/* we look for writable regions to determine the root set, we may */
@@ -274,7 +274,7 @@
/* Note that this code should never generate an incremental GC write */
/* fault. */
__try {
-#endif
+#endif /* defined(MSWIN32) && !defined(__GNUC__) */
switch(GC_mark_state) {
case MS_NONE:
return(FALSE);
@@ -395,7 +395,7 @@
ABORT("GC_mark_some: bad state");
return(FALSE);
}
-#ifdef MSWIN32
+#if defined(MSWIN32) && !defined(__GNUC__)
} __except (GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION ?
EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) {
# ifdef CONDPRINT
@@ -410,7 +410,7 @@
scan_ptr = 0;
return FALSE;
}
-#endif /* MSWIN32 */
+#endif /* defined(MSWIN32) && !defined(__GNUC__) */
}
More information about the Java-patches
mailing list