X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FUpdates.h;h=10fa09b0e578eca0a72d3e14ec8d090bbbe26f20;hb=de75026f5a48d3d052135a973ab4dff76c5b20f5;hp=3461c91144dfa553393cdde3d8191ba1302bf8e4;hpb=5ddee764beb312933256096d03df7c3ec47ac452;p=ghc-hetmet.git diff --git a/rts/Updates.h b/rts/Updates.h index 3461c91..10fa09b 100644 --- a/rts/Updates.h +++ b/rts/Updates.h @@ -35,19 +35,13 @@ #ifdef CMINUSMINUS #define BLOCK_BEGIN #define BLOCK_END -#define DECLARE_IPTR(info) W_ info -#define FCALL foreign "C" #define INFO_PTR(info) info -#define ARG_PTR "ptr" #else #define BLOCK_BEGIN { #define BLOCK_END } -#define DECLARE_IPTR(info) const StgInfoTable *(info) -#define FCALL /* nothing */ #define INFO_PTR(info) &info #define StgBlockingQueue_blocking_queue(closure) \ (((StgBlockingQueue *)closure)->blocking_queue) -#define ARG_PTR /* nothing */ #endif /* krc: there used to be an UPD_REAL_IND and an @@ -56,27 +50,12 @@ for now, we just have UPD_REAL_IND. */ #define UPD_REAL_IND(updclosure, ind_info, heapptr, and_then) \ BLOCK_BEGIN \ - DECLARE_IPTR(info); \ - info = GET_INFO(updclosure); \ updateWithIndirection(ind_info, \ updclosure, \ heapptr, \ and_then); \ BLOCK_END -#if defined(RTS_SUPPORTS_THREADS) - -# define UPD_IND_NOLOCK(updclosure, heapptr) \ - BLOCK_BEGIN \ - updateWithIndirection(INFO_PTR(stg_IND_info), \ - updclosure, \ - heapptr,); \ - BLOCK_END - -#else -#define UPD_IND_NOLOCK(updclosure,heapptr) UPD_IND(updclosure,heapptr) -#endif /* RTS_SUPPORTS_THREADS */ - /* ----------------------------------------------------------------------------- Awaken any threads waiting on a blocking queue (BLACKHOLE_BQ). -------------------------------------------------------------------------- */ @@ -280,15 +259,16 @@ no_slop: { \ bdescr *bd; \ \ - /* cas(p1, 0, &stg_WHITEHOLE_info); */ \ - ASSERT( (P_)p1 != (P_)p2 && !closure_IND(p1) ); \ + ASSERT( (P_)p1 != (P_)p2 ); \ + /* not necessarily true: ASSERT( !closure_IND(p1) ); */ \ + /* occurs in RaiseAsync.c:raiseAsync() */ \ DEBUG_FILL_SLOP(p1); \ LDV_RECORD_DEAD_FILL_SLOP_DYNAMIC(p1); \ ((StgInd *)p1)->indirectee = p2; \ write_barrier(); \ bd = Bdescr((P_)p1); \ if (bd->gen_no != 0) { \ - recordMutableGenLock(p1, &generations[bd->gen_no]); \ + recordMutableGenLock(p1, bd->gen_no); \ SET_INFO(p1, &stg_IND_OLDGEN_info); \ TICK_UPD_OLD_IND(); \ and_then; \