[commit: ghc] atomics: Tweak stg_casArrayzh as per Simon Marlow's suggestion. (1c45d05)
git at git.haskell.org
git at git.haskell.org
Wed Aug 21 14:04:53 CEST 2013
Repository : ssh://git@git.haskell.org/ghc
On branch : atomics
Link : http://ghc.haskell.org/trac/ghc/changeset/1c45d05d1a4808767fd921988495346f22290e23/ghc
>---------------------------------------------------------------
commit 1c45d05d1a4808767fd921988495346f22290e23
Author: Ryan Newton <rrnewton at gmail.com>
Date: Fri Apr 20 10:17:20 2012 -0400
Tweak stg_casArrayzh as per Simon Marlow's suggestion.
>---------------------------------------------------------------
1c45d05d1a4808767fd921988495346f22290e23
rts/PrimOps.cmm | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/rts/PrimOps.cmm b/rts/PrimOps.cmm
index 3bf5f37..b13e05c 100644
--- a/rts/PrimOps.cmm
+++ b/rts/PrimOps.cmm
@@ -223,12 +223,10 @@ stg_casArrayzh
RET_NP(1,h);
} else {
// Compare and Swap Succeeded:
- if (GET_INFO(arr) == stg_MUT_ARR_PTRS_CLEAN_info) {
- SET_HDR(arr, stg_MUT_ARR_PTRS_DIRTY_info, CCCS);
- len = StgMutArrPtrs_ptrs(arr);
- // The write barrier. We must write a byte into the mark table:
- I8[arr + SIZEOF_StgMutArrPtrs + WDS(len) + (ind >> MUT_ARR_PTRS_CARD_BITS )] = 1;
- }
+ SET_HDR(arr, stg_MUT_ARR_PTRS_DIRTY_info, CCCS);
+ len = StgMutArrPtrs_ptrs(arr);
+ // The write barrier. We must write a byte into the mark table:
+ I8[arr + SIZEOF_StgMutArrPtrs + WDS(len) + (ind >> MUT_ARR_PTRS_CARD_BITS )] = 1;
RET_NP(0,h);
}
}
More information about the ghc-commits
mailing list