diff options
author | Simon Marlow <marlowsd@gmail.com> | 2014-11-18 15:44:14 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2016-04-26 16:00:43 +0100 |
commit | e68195a96529cf1cc2d9cc6a9bc05183fce5ecea (patch) | |
tree | d79dbffbcb44cbdd7e10706535a66e4d9669378d /rts/Task.h | |
parent | c9bcaf3165586ac214fa694e61c55eb45eb131ab (diff) | |
download | haskell-e68195a96529cf1cc2d9cc6a9bc05183fce5ecea.tar.gz |
RTS: Add setInCallCapability()
This allows an OS thread to specify which capability it should run on
when it makes a call into Haskell. It is intended for a fairly
specialised use case, when the client wants to have tighter control over
the mapping between OS threads and Capabilities - perhaps 1:1
correspondence, for example.
Diffstat (limited to 'rts/Task.h')
-rw-r--r-- | rts/Task.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/rts/Task.h b/rts/Task.h index 37832a39d3..bcf456d270 100644 --- a/rts/Task.h +++ b/rts/Task.h @@ -151,6 +151,9 @@ typedef struct Task_ { // So that we can detect when a finalizer illegally calls back into Haskell rtsBool running_finalizers; + // if >= 0, this Capability will be used for in-calls + int preferred_capability; + // Links tasks on the returning_tasks queue of a Capability, and // on spare_workers. struct Task_ *next; |