From: simonmar Date: Tue, 28 Jan 2003 16:22:20 +0000 (+0000) Subject: [project @ 2003-01-28 16:22:20 by simonmar] X-Git-Tag: Approx_11550_changesets_converted~1230 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=f59af62c979b9ef706429911cd3d09bafb8f6578;p=ghc-hetmet.git [project @ 2003-01-28 16:22:20 by simonmar] - Add headers - Make initThreadLabels multi-init-safe --- diff --git a/ghc/rts/ThreadLabels.c b/ghc/rts/ThreadLabels.c index dacd8a3..e7bbd13 100644 --- a/ghc/rts/ThreadLabels.c +++ b/ghc/rts/ThreadLabels.c @@ -1,3 +1,11 @@ +/* ----------------------------------------------------------------------------- + * ThreadLabels.c + * + * (c) The GHC Team 2002-2003 + * + * Table of thread labels. + * + * ---------------------------------------------------------------------------*/ #include "PosixSource.h" #include "ThreadLabels.h" @@ -9,8 +17,9 @@ static HashTable * threadLabels = NULL; void initThreadLabelTable(void) { - ASSERT(threadLabels == NULL); - threadLabels = allocHashTable(); + if (threadLabels == NULL) { + threadLabels = allocHashTable(); + } } void diff --git a/ghc/rts/ThreadLabels.h b/ghc/rts/ThreadLabels.h index 46e060c..6fa8804 100644 --- a/ghc/rts/ThreadLabels.h +++ b/ghc/rts/ThreadLabels.h @@ -1,3 +1,12 @@ +/* ----------------------------------------------------------------------------- + * ThreadLabels.h + * + * (c) The GHC Team 2002-2003 + * + * Table of thread labels. + * + * ---------------------------------------------------------------------------*/ + #include "Rts.h" #include "Hash.h"