diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-05-20 22:36:34 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-05-20 22:36:34 +0000 |
commit | 0d489dae6cc0356ddfeaaf78805bf015486b543e (patch) | |
tree | bb912f33fd2185851d06bbae554211ac338240ff /boehm-gc/linux_threads.c | |
parent | b1ff8ab1599b3b2a32fc7aa82166b29a3ac11545 (diff) | |
download | gcc-0d489dae6cc0356ddfeaaf78805bf015486b543e.tar.gz |
* configure.host: Build with -fexceptions.
* linux_threads.c: Remember which thread stopped world for
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@42362 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'boehm-gc/linux_threads.c')
-rw-r--r-- | boehm-gc/linux_threads.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/boehm-gc/linux_threads.c b/boehm-gc/linux_threads.c index 2c856f567a0..92da410e3da 100644 --- a/boehm-gc/linux_threads.c +++ b/boehm-gc/linux_threads.c @@ -326,6 +326,11 @@ GC_thread GC_lookup_thread(pthread_t id) 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 @@ void GC_stop_world() 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 @@ void GC_start_world() #if DEBUG_THREADS GC_printf0("World started\n"); #endif + GC_stopping_thread = 0; /* debugging only */ } # ifdef IA64 |