From: simonmar Date: Tue, 23 Oct 2001 10:54:14 +0000 (+0000) Subject: [project @ 2001-10-23 10:54:14 by simonmar] X-Git-Tag: Approximately_9120_patches~753 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=bc80cec8cd3b13853ed97bab0936629919c7c830 [project @ 2001-10-23 10:54:14 by simonmar] We should really delete the main thread in a deadlock situation, otherwise if we somehow recover it might stay in the system indefinitely. --- diff --git a/ghc/rts/Schedule.c b/ghc/rts/Schedule.c index c8a6a94..7cad587 100644 --- a/ghc/rts/Schedule.c +++ b/ghc/rts/Schedule.c @@ -1,5 +1,5 @@ /* --------------------------------------------------------------------------- - * $Id: Schedule.c,v 1.100 2001/08/14 13:40:09 sewardj Exp $ + * $Id: Schedule.c,v 1.101 2001/10/23 10:54:14 simonmar Exp $ * * (c) The GHC Team, 1998-2000 * @@ -582,12 +582,14 @@ schedule( void ) StgMainThread *m = main_threads; #ifdef SMP for (; m != NULL; m = m->link) { + deleteThread(m->tso); m->ret = NULL; m->stat = Deadlock; pthread_cond_broadcast(&m->wakeup); } main_threads = NULL; #else + deleteThread(m->tso); m->ret = NULL; m->stat = Deadlock; main_threads = m->link;