projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 1998-04-10 10:49:39 by simonm]
[ghc-hetmet.git]
/
ghc
/
includes
/
Threads.lh
diff --git
a/ghc/includes/Threads.lh
b/ghc/includes/Threads.lh
index
f0f88a5
..
a8d2e8d
100644
(file)
--- a/
ghc/includes/Threads.lh
+++ b/
ghc/includes/Threads.lh
@@
-45,12
+45,20
@@
extern FILE *qp_file;
#endif
extern I_ context_switch; /* Flag set by signal handler */
#endif
extern I_ context_switch; /* Flag set by signal handler */
+#if defined(i386_TARGET_ARCH)
+extern I_ entersFromC; /* Counter set by enterStablePtr
+ (see comments in c-as-asm/StablePtrOps.lc) */
+#endif
#define CS_MAX_FREQUENCY 100 /* context switches per second */
#define CS_MIN_MILLISECS (1000/CS_MAX_FREQUENCY)/* milliseconds per slice */
#ifdef __STG_GCC_REGS__
#define CS_MAX_FREQUENCY 100 /* context switches per second */
#define CS_MIN_MILLISECS (1000/CS_MAX_FREQUENCY)/* milliseconds per slice */
#ifdef __STG_GCC_REGS__
-#define OR_CONTEXT_SWITCH || context_switch
+# if defined(i386_TARGET_ARCH)
+# define OR_CONTEXT_SWITCH || (context_switch && !entersFromC)
+# else
+# define OR_CONTEXT_SWITCH || context_switch
+# endif
#else
#define OR_CONTEXT_SWITCH /* in miniInterpret */
#endif
#else
#define OR_CONTEXT_SWITCH /* in miniInterpret */
#endif
@@
-74,7
+82,9
@@
extern I_ SparkLimit[SPARK_POOLS];
extern P_ RunnableThreadsHd, RunnableThreadsTl;
extern P_ WaitingThreadsHd, WaitingThreadsTl;
extern P_ RunnableThreadsHd, RunnableThreadsTl;
extern P_ WaitingThreadsHd, WaitingThreadsTl;
-extern I_ sparksIgnored;
+#if defined(PAR)
+extern I_ sparksIgnored, sparksCreated;
+#endif
IF_RTS(extern void AwaitEvent(I_);)
IF_RTS(extern void AwaitEvent(I_);)