[project @ 2003-01-28 16:22:20 by simonmar]
authorsimonmar <unknown>
Tue, 28 Jan 2003 16:22:20 +0000 (16:22 +0000)
committersimonmar <unknown>
Tue, 28 Jan 2003 16:22:20 +0000 (16:22 +0000)
- Add headers
- Make initThreadLabels multi-init-safe

ghc/rts/ThreadLabels.c
ghc/rts/ThreadLabels.h

index dacd8a3..e7bbd13 100644 (file)
@@ -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
index 46e060c..6fa8804 100644 (file)
@@ -1,3 +1,12 @@
+/* -----------------------------------------------------------------------------
+ * ThreadLabels.h
+ *
+ * (c) The GHC Team 2002-2003
+ *
+ * Table of thread labels.
+ *
+ * ---------------------------------------------------------------------------*/
+
 #include "Rts.h"
 #include "Hash.h"