/* -----------------------------------------------------------------------------
- * $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
*
* 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); \
} \
}
#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; \
#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); \
}
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 */