This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Patch: boehm-gc patch from Hans


I'm checking this in on the trunk.
This is the first piece of the hash synchronization patch.

2001-05-19  Hans Boehm  <hans_boehm@hp.com>

	* configure.host: Build with -fexceptions.
	* linux_threads.c: Remember which thread stopped world for

Tom

Index: configure.host
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/configure.host,v
retrieving revision 1.2
diff -u -r1.2 configure.host
--- configure.host	1999/06/30 12:43:22	1.2
+++ configure.host	2001/05/20 22:33:31
@@ -17,7 +17,7 @@
 # It sets the following shell variables:
 #   boehm_gc_cflags	Special CFLAGS to use when building
 
-boehm_gc_cflags=
+boehm_gc_cflags=-fexceptions
 
 case "${target_optspace}:${host}" in
   yes:*)
Index: linux_threads.c
===================================================================
RCS file: /cvs/gcc/gcc/boehm-gc/linux_threads.c,v
retrieving revision 1.9
diff -u -r1.9 linux_threads.c
--- linux_threads.c	2001/04/05 00:14:18	1.9
+++ linux_threads.c	2001/05/20 22:33:34
@@ -326,6 +326,11 @@
     return(p);
 }
 
+/* There seems to be a very rare thread stopping problem.  To help us 	*/
+/* debug that, we save the ids of the stopping thread. 			*/
+pthread_t GC_stopping_thread;
+int GC_stopping_pid;
+
 /* Caller holds allocation lock.	*/
 void GC_stop_world()
 {
@@ -335,6 +340,8 @@
     register int n_live_threads = 0;
     register int result;
 
+    GC_stopping_thread = my_thread;	/* debugging only.	*/
+    GC_stopping_pid = getpid();		/* debugging only.	*/
     for (i = 0; i < THREAD_TABLE_SZ; i++) {
       for (p = GC_threads[i]; p != 0; p = p -> next) {
         if (p -> id != my_thread) {
@@ -403,6 +410,7 @@
     #if DEBUG_THREADS
       GC_printf0("World started\n");
     #endif
+    GC_stopping_thread = 0;  /* debugging only */
 }
 
 # ifdef IA64


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]