From 81006a06736c7300626f9d692a118b493b585cd5 Mon Sep 17 00:00:00 2001 From: David Eichmann Date: Mon, 19 Oct 2020 17:03:41 +0100 Subject: 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 Co-authored-by: Matthew Pickering Co-authored-by: Ben Gamari --- includes/rts/Threads.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'includes/rts') 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); -- cgit v1.2.1