From: simonmar Date: Tue, 23 Oct 2001 11:28:51 +0000 (+0000) Subject: [project @ 2001-10-23 11:28:51 by simonmar] X-Git-Tag: Approximately_9120_patches~751 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=aa328192f6b09ad1c13038c719ac14db8daed121;p=ghc-hetmet.git [project @ 2001-10-23 11:28:51 by simonmar] Set the return value of a main thread to NULL when it wouldn't otherwise be set to anything useful. --- diff --git a/ghc/rts/Schedule.c b/ghc/rts/Schedule.c index 7cad587..b2fb90a 100644 --- a/ghc/rts/Schedule.c +++ b/ghc/rts/Schedule.c @@ -1,5 +1,5 @@ /* --------------------------------------------------------------------------- - * $Id: Schedule.c,v 1.101 2001/10/23 10:54:14 simonmar Exp $ + * $Id: Schedule.c,v 1.102 2001/10/23 11:28:51 simonmar Exp $ * * (c) The GHC Team, 1998-2000 * @@ -445,6 +445,7 @@ schedule( void ) pthread_cond_broadcast(&m->wakeup); break; case ThreadKilled: + if (m->ret) *(m->ret) = NULL; *prev = m->link; if (was_interrupted) { m->stat = Interrupted; @@ -477,6 +478,7 @@ schedule( void ) m->stat = Success; return; } else { + if (m->ret) { *(m->ret) = NULL; }; if (was_interrupted) { m->stat = Interrupted; } else {