• Simon Marlow's avatar
    Make forkProcess work with +RTS -N · 8b75acd3
    Simon Marlow authored
    Consider this experimental for the time being.  There are a lot of
    things that could go wrong, but I've verified that at least it works
    on the test cases we have.
    I also did some API cleanups while I was here.  Previously we had:
    Capability * rts_eval (Capability *cap, HaskellObj p, /*out*/HaskellObj *ret);
    but this API is particularly error-prone: if you forget to discard the
    Capability * you passed in and use the return value instead, then
    you're in for subtle bugs with +RTS -N later on.  So I changed all
    these functions to this form:
    void rts_eval (/* inout */ Capability **cap,
                   /* in    */ HaskellObj p,
                   /* out */   HaskellObj *ret)
    It's much harder to use this version incorrectly, because you have to
    pass the Capability in by reference.
Stable.c 14.4 KB