diff options
author | simonmar <unknown> | 2005-10-26 10:42:54 +0000 |
---|---|---|
committer | simonmar <unknown> | 2005-10-26 10:42:54 +0000 |
commit | 7c82b4a858411e7363f46d29bbd297e7880ef625 (patch) | |
tree | 917eb8874459b6cb3cc1b2e085f4b8c1c2c73d5f /ghc/includes | |
parent | 474656aa64e690fc48752eabecf2b76532c31ea7 (diff) | |
download | haskell-7c82b4a858411e7363f46d29bbd297e7880ef625.tar.gz |
[project @ 2005-10-26 10:42:54 by simonmar]
- change the type of StgRun(): now we return the Capability that the
thread currently holds. The return status of the thread is now
stored in cap->r.rRet (a new slot in the reg table).
This was necessary because on return from StgRun(), the current
TSO may be blocked, so it no longer belongs to us. If it is a bound
thread, then the Task may have been already woken up on another
Capability, so the scheduler can't use task->cap to find the
capability it currently owns.
- when shutting down, allow a bound thread to remove its TSO from
the run queue when exiting (eliminates an error condition in
releaseCapability()).
Diffstat (limited to 'ghc/includes')
-rw-r--r-- | ghc/includes/Regs.h | 3 | ||||
-rw-r--r-- | ghc/includes/mkDerivedConstants.c | 1 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ghc/includes/Regs.h b/ghc/includes/Regs.h index b65d242b04..f1b8597d60 100644 --- a/ghc/includes/Regs.h +++ b/ghc/includes/Regs.h @@ -98,11 +98,10 @@ typedef struct StgRegTable_ { MP_INT rmp_tmp2; MP_INT rmp_result1; MP_INT rmp_result2; + StgWord rRet; // holds the return code of the thread #if defined(SMP) || defined(PAR) StgSparkPool rSparks; /* per-task spark pool */ #endif - // If this flag is set, we are running Haskell code. Used to detect - // uses of 'foreign import unsafe' that should be 'safe'. } StgRegTable; #if IN_STG_CODE diff --git a/ghc/includes/mkDerivedConstants.c b/ghc/includes/mkDerivedConstants.c index d782d04e3c..e94cbbf002 100644 --- a/ghc/includes/mkDerivedConstants.c +++ b/ghc/includes/mkDerivedConstants.c @@ -242,6 +242,7 @@ main(int argc, char *argv[]) field_offset(StgRegTable, rCurrentTSO); field_offset(StgRegTable, rCurrentNursery); field_offset(StgRegTable, rHpAlloc); + struct_field(StgRegTable, rRet); // Needed for SMP builds field_offset(StgRegTable, rmp_tmp_w); |