[project @ 2005-11-25 13:59:33 by simonmar]
[ghc-hetmet.git] / ghc / rts / Interpreter.c
index 0ad2b6e..b31ade0 100644 (file)
 #define RETURN_TO_SCHEDULER(todo,retcode)      \
    SAVE_STACK_POINTERS;                                \
    cap->r.rCurrentTSO->what_next = (todo);     \
-   threadPaused(cap->r.rCurrentTSO);           \
-   return (retcode);
+   threadPaused(cap,cap->r.rCurrentTSO);               \
+   cap->r.rRet = (retcode);                    \
+   return cap;
 
 #define RETURN_TO_SCHEDULER_NO_PAUSE(todo,retcode)     \
-   SAVE_STACK_POINTERS;                                \
-   cap->r.rCurrentTSO->what_next = (todo);     \
-   return (retcode);
+   SAVE_STACK_POINTERS;                                        \
+   cap->r.rCurrentTSO->what_next = (todo);             \
+   cap->r.rRet = (retcode);                            \
+   return cap;
 
 
 STATIC_INLINE StgPtr
@@ -170,7 +172,7 @@ static StgWord app_ptrs_itbl[] = {
     (W_)&stg_ap_pppppp_info,
 };
 
-StgThreadReturnCode
+Capability *
 interpretBCO (Capability* cap)
 {
     // Use of register here is primarily to make it clear to compilers