+#ifdef TICKY_TICKY
+# define UPD_IND(updclosure, heapptr) \
+ UPD_PERM_IND(updclosure,heapptr)
+# define UPD_SPEC_IND(updclosure, ind_info, heapptr, and_then) \
+ UPD_PERM_IND(updclosure,heapptr); and_then
+#else
+# define UPD_IND(updclosure, heapptr) \
+ UPD_REAL_IND(updclosure,&stg_IND_info,heapptr,)
+# define UPD_SPEC_IND(updclosure, ind_info, heapptr, and_then) \
+ UPD_REAL_IND(updclosure,ind_info,heapptr,and_then)
+#endif
+
+/* UPD_IND actually does a PERM_IND if TICKY_TICKY is on;
+ if you *really* need an IND use UPD_REAL_IND
+ */
+#ifdef SMP
+#define UPD_REAL_IND(updclosure, ind_info, heapptr, and_then) \
+ { \
+ const StgInfoTable *info; \
+ if (Bdescr((P_)updclosure)->u.back != (bdescr *)BaseReg) { \
+ info = LOCK_CLOSURE(updclosure); \
+ } else { \
+ info = updclosure->header.info; \
+ } \
+ AWAKEN_BQ(info,updclosure); \
+ updateWithIndirection(info, ind_info, \
+ (StgClosure *)updclosure, \
+ (StgClosure *)heapptr, \
+ and_then); \
+ }
+#else
+#define UPD_REAL_IND(updclosure, ind_info, heapptr, and_then) \
+ { \
+ const StgInfoTable *info; \
+ info = ((StgClosure *)updclosure)->header.info; \
+ AWAKEN_BQ(info,updclosure); \
+ updateWithIndirection(((StgClosure *)updclosure)->header.info, ind_info, \
+ (StgClosure *)updclosure, \
+ (StgClosure *)heapptr, \
+ and_then); \
+ }
+#endif
+
+#define UPD_STATIC_IND(updclosure, heapptr) \
+ { \
+ const StgInfoTable *info; \
+ info = ((StgClosure *)updclosure)->header.info; \
+ AWAKEN_STATIC_BQ(info,updclosure); \
+ updateWithStaticIndirection(info, \
+ (StgClosure *)updclosure, \
+ (StgClosure *)heapptr); \
+ }
+
+#if defined(PROFILING) || defined(TICKY_TICKY)
+#define UPD_PERM_IND(updclosure, heapptr) \
+ { \
+ const StgInfoTable *info; \
+ info = ((StgClosure *)updclosure)->header.info; \
+ AWAKEN_BQ(info,updclosure); \
+ updateWithPermIndirection(info, \
+ (StgClosure *)updclosure, \
+ (StgClosure *)heapptr); \
+ }
+#endif