X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fincludes%2FPrimOps.h;h=0e4ee74c6192135747791e75dd936e37f352fc17;hb=3e0909fc21763bd6558350faf20550d8ce997865;hp=a853c6736503541acf0d64c6352a40c2532a8fb4;hpb=7d4b7f77fccd02d7bd8b22040751c126a1ff4606;p=ghc-hetmet.git diff --git a/ghc/includes/PrimOps.h b/ghc/includes/PrimOps.h index a853c67..0e4ee74 100644 --- a/ghc/includes/PrimOps.h +++ b/ghc/includes/PrimOps.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: PrimOps.h,v 1.92 2002/03/19 11:24:51 simonmar Exp $ + * $Id: PrimOps.h,v 1.99 2002/10/22 11:01:18 simonmar Exp $ * * (c) The GHC Team, 1998-2000 * @@ -48,11 +48,11 @@ #if SIZEOF_VOID_P == 4 #ifdef WORDS_BIGENDIAN -#define C 0 -#define R 1 +#define RTS_CARRY_IDX__ 0 +#define RTS_REM_IDX__ 1 #else -#define C 1 -#define R 0 +#define RTS_CARRY_IDX__ 1 +#define RTS_REM_IDX__ 0 #endif typedef union { @@ -65,8 +65,8 @@ typedef union { StgInt32 r, c; \ long_long_u z; \ z.l = (StgInt64)a * (StgInt64)b; \ - r = z.i[R]; \ - c = z.i[C]; \ + r = z.i[RTS_REM_IDX__]; \ + c = z.i[RTS_CARRY_IDX__]; \ if (c == 0 || c == -1) { \ c = ((StgWord)((a^b) ^ r)) \ >> (BITS_IN (I_) - 1); \ @@ -218,7 +218,7 @@ extern StgInt isFloatNegativeZero(StgFloat f); -------------------------------------------------------------------------- */ EXTFUN_RTS(newMutVarzh_fast); - +EXTFUN_RTS(atomicModifyMutVarzh_fast); /* ----------------------------------------------------------------------------- MVar PrimOps. @@ -267,16 +267,17 @@ EXTFUN_RTS(deRefStablePtrzh_fast); -------------------------------------------------------------------------- */ EXTFUN_RTS(forkzh_fast); +EXTFUN_RTS(forkProcesszh_fast); EXTFUN_RTS(yieldzh_fast); EXTFUN_RTS(killThreadzh_fast); EXTFUN_RTS(seqzh_fast); EXTFUN_RTS(blockAsyncExceptionszh_fast); EXTFUN_RTS(unblockAsyncExceptionszh_fast); EXTFUN_RTS(myThreadIdzh_fast); +EXTFUN_RTS(labelThreadzh_fast); -extern int cmp_thread(const StgTSO *tso1, const StgTSO *tso2); -extern int rts_getThreadId(const StgTSO *tso); - +extern int cmp_thread(StgPtr tso1, StgPtr tso2); +extern int rts_getThreadId(StgPtr tso); /* ----------------------------------------------------------------------------- Weak Pointer PrimOps. @@ -313,22 +314,6 @@ EXTFUN_RTS(mkForeignObjzh_fast); EXTFUN_RTS(newBCOzh_fast); EXTFUN_RTS(mkApUpd0zh_fast); - -/* ----------------------------------------------------------------------------- - Signal handling. Not really primops, but called directly from Haskell. - -------------------------------------------------------------------------- */ - -#define STG_SIG_DFL (-1) -#define STG_SIG_IGN (-2) -#define STG_SIG_ERR (-3) -#define STG_SIG_HAN (-4) - -extern StgInt stg_sig_install (StgInt, StgInt, StgStablePtr, sigset_t *); -#define stg_sig_default(sig,mask) stg_sig_install(sig,STG_SIG_DFL,0,(sigset_t *)mask) -#define stg_sig_ignore(sig,mask) stg_sig_install(sig,STG_SIG_IGN,0,(sigset_t *)mask) -#define stg_sig_catch(sig,ptr,mask) stg_sig_install(sig,STG_SIG_HAN,ptr,(sigset_t *)mask) - - /* ------------------------------------------------------------------------ Parallel PrimOps