summaryrefslogtreecommitdiff
path: root/includes/rts/Threads.h
diff options
context:
space:
mode:
authorDavid Eichmann <EichmannD@gmail.com>2020-10-19 17:03:41 +0100
committerDavid Eichmann <EichmannD@gmail.com>2020-10-30 13:43:44 +0000
commitc83b97d19889d0844f73a26f36d3169f698e92c8 (patch)
tree92e832e68e6ccf4934c5de988f3f8971e11eca9a /includes/rts/Threads.h
parent28f98b01d055c8027f9495b1669bf875b3e42168 (diff)
downloadhaskell-wip/ghc-debug_pause_and_resume.tar.gz
RtsAPI: pause and resume the RTSwip/ghc-debug_pause_and_resume
The `rts_pause` and `rts_resume` functions have been added to `RtsAPI.h` and allow an external process to completely pause and resume the RTS. Co-authored-by: Sven Tennie <sven.tennie@gmail.com> Co-authored-by: Matthew Pickering <matthewtpickering@gmail.com> Co-authored-by: Ben Gamari <bgamari.foss@gmail.com>
Diffstat (limited to 'includes/rts/Threads.h')
-rw-r--r--includes/rts/Threads.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/includes/rts/Threads.h b/includes/rts/Threads.h
index 6d4aa76761..51c11742ca 100644
--- a/includes/rts/Threads.h
+++ b/includes/rts/Threads.h
@@ -23,6 +23,10 @@
//
StgTSO *createThread (Capability *cap, W_ stack_size);
+// precondition:
+// (*cap)->running_task != NULL
+// (*cap)->running_task must be a bound task (e.g. newBoundTask() has been
+// called on that thread).
void scheduleWaitThread (/* in */ StgTSO *tso,
/* out */ HaskellObj* ret,
/* inout */ Capability **cap);