summaryrefslogtreecommitdiff
path: root/includes/rts
diff options
context:
space:
mode:
authorDavid Eichmann <EichmannD@gmail.com>2020-10-19 17:03:41 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-11-02 23:46:19 -0500
commit81006a06736c7300626f9d692a118b493b585cd5 (patch)
treeef2e3ee8d4e2a3f21ab2f266edd4317abf6747f2 /includes/rts
parent0b7722219ffdb109c3a8b034a8e112d18e6e4336 (diff)
downloadhaskell-81006a06736c7300626f9d692a118b493b585cd5.tar.gz
RtsAPI: pause and resume the RTS
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')
-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);