/* -----------------------------------------------------------------------------
- * $Id: SchedAPI.h,v 1.2 1998/12/02 13:21:33 simonm Exp $
+ * $Id: SchedAPI.h,v 1.3 1999/05/21 14:46:21 sof Exp $
*
* (c) The GHC Team 1998
*
SchedulerStatus schedule(StgTSO *main_thread, /*out*/StgClosure **ret);
/*
- * Creating thraeds
+ * Creating threads
*/
StgTSO *createThread (nat stack_size);
return t;
}
+/*
+ * Same as above, but also evaluate the result of the IO action
+ * to whnf while we're at it.
+ */
+
+static inline StgTSO *
+createStrictIOThread(nat stack_size, StgClosure *closure) {
+ StgTSO *t;
+ t = createThread(stack_size);
+ pushClosure(t,closure);
+ pushClosure(t,&forceIO_closure);
+ return t;
+}
+
+
/*
* Killing threads
*/