Asynchronous exception support for SMP
authorSimon Marlow <simonmar@microsoft.com>
Fri, 16 Jun 2006 10:33:42 +0000 (10:33 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Fri, 16 Jun 2006 10:33:42 +0000 (10:33 +0000)
commitb1953bbb1ed3cb16497e5447db7487f0c2d9e41a
treedf9e129c57b586a952634dc080939b621ae64cf8
parent1e3d53b4707a6c9c7c99cdaa54e3646b840f5cc9
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.
23 files changed:
includes/Constants.h
includes/SMP.h
includes/StgMiscClosures.h
includes/TSO.h
includes/mkDerivedConstants.c
rts/Capability.c
rts/Capability.h
rts/Exception.cmm
rts/Exception.h [deleted file]
rts/GC.c
rts/GCCompact.c
rts/HCIncludes.h [new file with mode: 0644]
rts/HeapStackCheck.cmm
rts/Makefile
rts/RaiseAsync.c [new file with mode: 0644]
rts/RaiseAsync.h [new file with mode: 0644]
rts/Schedule.c
rts/Schedule.h
rts/ThreadLabels.c
rts/ThreadLabels.h
rts/Threads.c [new file with mode: 0644]
rts/Threads.h [new file with mode: 0644]
rts/Trace.h