/* ----------------------------------------------------------------------------
- * $Id: RtsAPI.c,v 1.41 2003/02/06 09:56:10 simonmar Exp $
+ * $Id: RtsAPI.c,v 1.43 2003/03/18 10:28:15 simonmar Exp $
*
* (c) The GHC Team, 1998-2001
*
return (void *)(p->payload[0]);
}
+HsFunPtr
+rts_getFunPtr (HaskellObj p)
+{
+ // See comment above:
+ // ASSERT(p->header.info == FunPtr_con_info ||
+ // p->header.info == FunPtr_static_info);
+ return (void *)(p->payload[0]);
+}
+
#ifdef COMPILER /* GHC has em, Hugs doesn't */
HsBool
rts_getBool (HaskellObj p)
}
/*
- * Identical to rts_evalIO(), but won't create a new task/OS thread
+ * Identical to rts_evalLazyIO(), but won't create a new task/OS thread
* to evaluate the Haskell thread. Used by main() only. Hack.
*/
SchedulerStatus
-rts_mainEvalIO(HaskellObj p, /*out*/HaskellObj *ret)
+rts_mainLazyIO(HaskellObj p, /*out*/HaskellObj *ret)
{
StgTSO* tso;
- tso = createStrictIOThread(RtsFlags.GcFlags.initialStkSize, p);
+ tso = createIOThread(RtsFlags.GcFlags.initialStkSize, p);
scheduleThread(tso);
return waitThread(tso, ret);
}