Skip to content
Snippets Groups Projects
Forked from Glasgow Haskell Compiler / GHC
Source project has a limited visibility.
  • Simon Marlow's avatar
    8b75acd3
    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.
    8b75acd3
    History
    Make forkProcess work with +RTS -N
    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.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.