- set thread labels to NULL after free()
- labelThread# didn't exit properly
TODO: Labels are prematurely free()d when a thread terminates. Better let
the GC worry?
/* -----------------------------------------------------------------------------
/* -----------------------------------------------------------------------------
- * $Id: PrimOps.hc,v 1.95 2002/04/10 11:43:45 stolz Exp $
+ * $Id: PrimOps.hc,v 1.96 2002/04/23 09:56:29 stolz Exp $
*
* (c) The GHC Team, 1998-2000
*
*
* (c) The GHC Team, 1998-2000
*
#ifdef DEBUG
STGCALL2(labelThread,CurrentTSO,(char *)R1.p);
#endif
#ifdef DEBUG
STGCALL2(labelThread,CurrentTSO,(char *)R1.p);
#endif
+ JMP_(ENTRY_CODE(Sp[0]));
/* ---------------------------------------------------------------------------
/* ---------------------------------------------------------------------------
- * $Id: Schedule.c,v 1.138 2002/04/23 06:34:27 sof Exp $
+ * $Id: Schedule.c,v 1.139 2002/04/23 09:56:28 stolz Exp $
*
* (c) The GHC Team, 1998-2000
*
*
* (c) The GHC Team, 1998-2000
*
broadcastCondition(&m->wakeup);
#ifdef DEBUG
free(m->tso->label);
broadcastCondition(&m->wakeup);
#ifdef DEBUG
free(m->tso->label);
#endif
break;
case ThreadKilled:
#endif
break;
case ThreadKilled:
broadcastCondition(&m->wakeup);
#ifdef DEBUG
free(m->tso->label);
broadcastCondition(&m->wakeup);
#ifdef DEBUG
free(m->tso->label);
|| m->tso->what_next == ThreadKilled) {
#ifdef DEBUG
free(m->tso->label);
|| m->tso->what_next == ThreadKilled) {
#ifdef DEBUG
free(m->tso->label);
#endif
main_threads = main_threads->link;
if (m->tso->what_next == ThreadComplete) {
#endif
main_threads = main_threads->link;
if (m->tso->what_next == ThreadComplete) {
if (buf == NULL) {
fprintf(stderr,"insufficient memory for labelThread!\n");
free(tso->label);
if (buf == NULL) {
fprintf(stderr,"insufficient memory for labelThread!\n");
free(tso->label);
} else
strncpy(buf,label,len);
tso->label = buf;
} else
strncpy(buf,label,len);
tso->label = buf;