1 /* -----------------------------------------------------------------------------
3 * (c) The GHC Team 1998-2009
5 * External API for the scheduler. For most uses, the functions in
6 * RtsAPI.h should be enough.
8 * ---------------------------------------------------------------------------*/
16 StgTSO *createThread (Capability *cap, nat stack_size);
18 Capability *scheduleWaitThread (StgTSO *tso, /*out*/HaskellObj* ret,
21 StgTSO *createGenThread (Capability *cap, nat stack_size,
23 StgTSO *createIOThread (Capability *cap, nat stack_size,
25 StgTSO *createStrictIOThread (Capability *cap, nat stack_size,
28 // Suspending/resuming threads around foreign calls
29 void * suspendThread (StgRegTable *);
30 StgRegTable * resumeThread (void *);
33 // Thread operations from Threads.c
35 int cmp_thread (StgPtr tso1, StgPtr tso2);
36 int rts_getThreadId (StgPtr tso);
37 pid_t forkProcess (HsStablePtr *entry);
38 HsBool rtsSupportsBoundThreads (void);
40 // The number of Capabilities
41 extern unsigned int n_capabilities;
44 extern Capability MainCapability;
47 #endif /* RTS_THREADS_H */