Commit 619cd23c authored by sof's avatar sof
Browse files

[project @ 2002-02-15 07:37:55 by sof]

Distinguish between the scheduling of a new thread from within
the RTS (e.g., via forkIO, running finalizers etc) and scheduling
of a thread that's created via the RtsAPI -- the latter
now uses scheduleExtThread(), the rest scheduleThread().

Why the distinction? Because the former will in threaded builds create
a worker OS thread, while the latter won't. (There's an added
wrinkle -- main() will also use scheduleThread()).
parent c92c7487
/* -----------------------------------------------------------------------------
* $Id: SchedAPI.h,v 1.13 2001/03/22 03:51:09 hwloidl Exp $
* $Id: SchedAPI.h,v 1.14 2002/02/15 07:37:55 sof Exp $
* (c) The GHC Team 1998
......@@ -16,26 +16,21 @@
#define NO_PRI 0
* schedule() plus the thread creation functions are not part
* part of the external RTS API, so leave them out if we're
* not compiling rts/ bits. -- sof 7/99
SchedulerStatus waitThread(StgTSO *main_thread, /*out*/StgClosure **ret);
extern SchedulerStatus waitThread(StgTSO *main_thread, /*out*/StgClosure **ret);
* Creating threads
#if defined(GRAN)
StgTSO *createThread(nat stack_size, StgInt pri);
extern StgTSO *createThread(nat stack_size, StgInt pri);
StgTSO *createThread(nat stack_size);
extern StgTSO *createThread(nat stack_size);
#if defined(PAR) || defined(SMP)
void taskStart(void);
extern void taskStart(void);
void scheduleThread(StgTSO *tso);
extern void scheduleThread(StgTSO *tso);
extern void scheduleExtThread(StgTSO *tso);
static inline void pushClosure (StgTSO *tso, StgClosure *c) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment