summaryrefslogtreecommitdiff
path: root/rts/ThreadLabels.h
diff options
context:
space:
mode:
authorSimon Marlow <simonmar@microsoft.com>2006-06-16 10:33:42 +0000
committerSimon Marlow <simonmar@microsoft.com>2006-06-16 10:33:42 +0000
commitb1953bbb1ed3cb16497e5447db7487f0c2d9e41a (patch)
treedf9e129c57b586a952634dc080939b621ae64cf8 /rts/ThreadLabels.h
parent1e3d53b4707a6c9c7c99cdaa54e3646b840f5cc9 (diff)
downloadhaskell-b1953bbb1ed3cb16497e5447db7487f0c2d9e41a.tar.gz
Asynchronous exception support for SMP
This patch makes throwTo work with -threaded, and also refactors large parts of the concurrency support in the RTS to clean things up. We have some new files: RaiseAsync.{c,h} asynchronous exception support Threads.{c,h} general threading-related utils Some of the contents of these new files used to be in Schedule.c, which is smaller and cleaner as a result of the split. Asynchronous exception support in the presence of multiple running Haskell threads is rather tricky. In fact, to my annoyance there are still one or two bugs to track down, but the majority of the tests run now.
Diffstat (limited to 'rts/ThreadLabels.h')
-rw-r--r--rts/ThreadLabels.h24
1 files changed, 9 insertions, 15 deletions
diff --git a/rts/ThreadLabels.h b/rts/ThreadLabels.h
index 97d3d0d241..eaed22d281 100644
--- a/rts/ThreadLabels.h
+++ b/rts/ThreadLabels.h
@@ -1,27 +1,21 @@
/* -----------------------------------------------------------------------------
* ThreadLabels.h
*
- * (c) The GHC Team 2002-2003
+ * (c) The GHC Team 2002-2006
*
* Table of thread labels.
*
* ---------------------------------------------------------------------------*/
+
#ifndef __THREADLABELS_H__
#define __THREADLABELS_H__
-#include "Rts.h"
-#include "Hash.h"
-
-void
-initThreadLabelTable(void);
-
-void
-updateThreadLabel(StgWord key, void *data);
-
-void *
-lookupThreadLabel(StgWord key);
-
-void
-removeThreadLabel(StgWord key);
+#if defined(DEBUG)
+void initThreadLabelTable (void);
+void updateThreadLabel (StgWord key, void *data);
+void * lookupThreadLabel (StgWord key);
+void removeThreadLabel (StgWord key);
+void labelThread (StgPtr tso, char *label);
+#endif
#endif /* __THREADLABELS_H__ */