projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't generate stub files when -fno-code is given.
[ghc-hetmet.git]
/
ghc
/
rts
/
Schedule.h
diff --git
a/ghc/rts/Schedule.h
b/ghc/rts/Schedule.h
index
1626852
..
63dfeb7
100644
(file)
--- a/
ghc/rts/Schedule.h
+++ b/
ghc/rts/Schedule.h
@@
-86,7
+86,6
@@
void GetRoots(evac_fn);
*/
void workerStart(Task *task);
*/
void workerStart(Task *task);
-// ToDo: check whether all fcts below are used in the SMP version, too
#if defined(GRAN)
void awaken_blocked_queue(StgBlockingQueueElement *q, StgClosure *node);
void unlink_from_bq(StgTSO* tso, StgClosure* node);
#if defined(GRAN)
void awaken_blocked_queue(StgBlockingQueueElement *q, StgClosure *node);
void unlink_from_bq(StgTSO* tso, StgClosure* node);
@@
-107,15
+106,16
@@
void initThread(StgTSO *tso, nat stack_size);
*/
extern int RTS_VAR(context_switch);
*/
extern int RTS_VAR(context_switch);
-/* Interrupted flag.
- * Locks required : none (makes one transition from false->true)
+/* The state of the scheduler. This is used to control the sequence
+ * of events during shutdown, and when the runtime is interrupted
+ * using ^C.
*/
*/
-extern rtsBool RTS_VAR(interrupted);
+#define SCHED_RUNNING 0 /* running as normal */
+#define SCHED_INTERRUPTING 1 /* ^C detected, before threads are deleted */
+#define SCHED_INTERRUPTED 2 /* ^C detected, after threads deleted */
+#define SCHED_SHUTTING_DOWN 3 /* final shutdown */
-/* Shutdown flag.
- * Locks required : none (makes one transition from false->true)
- */
-extern rtsBool shutting_down_scheduler;
+extern rtsBool RTS_VAR(sched_state);
/*
* flag that tracks whether we have done any execution in this time slice.
/*
* flag that tracks whether we have done any execution in this time slice.
@@
-295,5
+295,11
@@
void sched_belch(char *s, ...)
#endif /* !IN_STG_CODE */
#endif /* !IN_STG_CODE */
+STATIC_INLINE void
+dirtyTSO (StgTSO *tso)
+{
+ tso->flags |= TSO_DIRTY;
+}
+
#endif /* SCHEDULE_H */
#endif /* SCHEDULE_H */