diff options
Diffstat (limited to 'includes/SchedAPI.h')
-rw-r--r-- | includes/SchedAPI.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/includes/SchedAPI.h b/includes/SchedAPI.h new file mode 100644 index 0000000000..8dff6ea63d --- /dev/null +++ b/includes/SchedAPI.h @@ -0,0 +1,36 @@ +/* ----------------------------------------------------------------------------- + * + * (c) The GHC Team 1998-2002 + * + * External API for the scheduler. For most uses, the functions in + * RtsAPI.h should be enough. + * + * ---------------------------------------------------------------------------*/ + +#ifndef SCHEDAPI_H +#define SCHEDAPI_H + +#if defined(GRAN) +/* Dummy def for NO_PRI if not in GranSim */ +#define NO_PRI 0 +#endif + +/* + * Creating threads + */ +#if defined(GRAN) +StgTSO *createThread (Capability *cap, nat stack_size, StgInt pri); +#else +StgTSO *createThread (Capability *cap, nat stack_size); +#endif + +Capability *scheduleWaitThread (StgTSO *tso, /*out*/HaskellObj* ret, + Capability *cap); + +StgTSO *createGenThread (Capability *cap, nat stack_size, + StgClosure *closure); +StgTSO *createIOThread (Capability *cap, nat stack_size, + StgClosure *closure); +StgTSO *createStrictIOThread (Capability *cap, nat stack_size, + StgClosure *closure); +#endif |