X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fincludes%2FUpdates.h;h=e142cd0e9ec1c52e1728160352aae73f7de83755;hb=c6ab4bfa09886be3bfff4aa747af2f1c8e348a1f;hp=ebcebf18c4029e120f83690108ca4ba57984d2e1;hpb=7f309f1c021e7583f724cce599ce2dd3c439361b;p=ghc-hetmet.git diff --git a/ghc/includes/Updates.h b/ghc/includes/Updates.h index ebcebf1..e142cd0 100644 --- a/ghc/includes/Updates.h +++ b/ghc/includes/Updates.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Updates.h,v 1.7 1999/02/05 16:02:31 simonm Exp $ + * $Id: Updates.h,v 1.12 1999/08/25 16:11:44 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -26,22 +26,38 @@ * preferably don't use this macro inline in compiled code. */ -#define UPD_IND(updclosure, heapptr) \ +#ifdef TICKY_TICKY +# define UPD_IND(updclosure, heapptr) UPD_PERM_IND(updclosure,heapptr) +#else +# define UPD_IND(updclosure, heapptr) UPD_REAL_IND(updclosure,heapptr) +#endif + +/* UPD_IND actually does a PERM_IND if TICKY_TICKY is on; + if you *really* need an IND use UPD_REAL_IND + */ +#define UPD_REAL_IND(updclosure, heapptr) \ AWAKEN_BQ(updclosure); \ updateWithIndirection((StgClosure *)updclosure, \ (StgClosure *)heapptr); +#if defined(PROFILING) || defined(TICKY_TICKY) +#define UPD_PERM_IND(updclosure, heapptr) \ + AWAKEN_BQ(updclosure); \ + updateWithPermIndirection((StgClosure *)updclosure, \ + (StgClosure *)heapptr); +#endif + /* ----------------------------------------------------------------------------- Awaken any threads waiting on this computation -------------------------------------------------------------------------- */ -extern void awaken_blocked_queue(StgTSO *q); +extern void awakenBlockedQueue(StgTSO *q); #define AWAKEN_BQ(closure) \ if (closure->header.info == &BLACKHOLE_BQ_info) { \ StgTSO *bq = ((StgBlockingQueue *)closure)->blocking_queue;\ if (bq != (StgTSO *)&END_TSO_QUEUE_closure) { \ - STGCALL1(awaken_blocked_queue, bq); \ + STGCALL1(awakenBlockedQueue, bq); \ } \ } @@ -56,12 +72,12 @@ extern void awaken_blocked_queue(StgTSO *q); #define PUSH_STD_CCCS(frame) #endif -extern const StgPolyInfoTable Upd_frame_info; +extern DLL_IMPORT_DATA const StgPolyInfoTable Upd_frame_info; #define PUSH_UPD_FRAME(target, Sp_offset) \ { \ StgUpdateFrame *__frame; \ - TICK_UPDF_PUSHED(); \ + TICK_UPDF_PUSHED(target, GET_INFO((StgClosure*)target)); \ __frame = stgCast(StgUpdateFrame*,Sp + (Sp_offset)) - 1; \ SET_INFO(__frame,stgCast(StgInfoTable*,&Upd_frame_info)); \ __frame->link = Su; \ @@ -98,7 +114,7 @@ extern void newCAF(StgClosure*); #define UPD_CAF(cafptr, bhptr) \ { \ - SET_INFO((StgInd *)cafptr,&IND_STATIC_info); \ + SET_INFO((StgInd *)cafptr,(const StgInfoTable*)&IND_STATIC_info); \ ((StgInd *)cafptr)->indirectee = (StgClosure *)(bhptr); \ STGCALL1(newCAF,(StgClosure *)cafptr); \ } @@ -107,16 +123,16 @@ extern void newCAF(StgClosure*); Update-related prototypes -------------------------------------------------------------------------- */ -extern STGFUN(Upd_frame_entry); +DLL_IMPORT_RTS extern STGFUN(Upd_frame_entry); -extern const StgInfoTable PAP_info; -STGFUN(PAP_entry); +extern DLL_IMPORT_DATA const StgInfoTable PAP_info; +DLL_IMPORT_RTS STGFUN(PAP_entry); -EXTFUN(stg_update_PAP); +EXTFUN_RTS(stg_update_PAP); -extern const StgInfoTable AP_UPD_info; -STGFUN(AP_UPD_entry); +extern DLL_IMPORT_DATA const StgInfoTable AP_UPD_info; +DLL_IMPORT_RTS STGFUN(AP_UPD_entry); -extern const StgInfoTable raise_info; +extern DLL_IMPORT_DATA const StgInfoTable raise_info; #endif /* UPDATES_H */