projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e3fc374
)
[project @ 2002-02-15 21:07:19 by sof]
author
sof
<unknown>
Fri, 15 Feb 2002 21:07:20 +0000
(21:07 +0000)
committer
sof
<unknown>
Fri, 15 Feb 2002 21:07:20 +0000
(21:07 +0000)
comments only
ghc/rts/Capability.c
patch
|
blob
|
history
ghc/rts/Capability.h
patch
|
blob
|
history
diff --git
a/ghc/rts/Capability.c
b/ghc/rts/Capability.c
index
2dec782
..
638dd4a
100644
(file)
--- a/
ghc/rts/Capability.c
+++ b/
ghc/rts/Capability.c
@@
-68,8
+68,8
@@
Condition thread_ready_cond = INIT_COND_VAR;
* the number of tasks currently blocked waiting on thread_ready_cond.
* (if > 0 => no need for a new task, just unblock an existing one).
*
* the number of tasks currently blocked waiting on thread_ready_cond.
* (if > 0 => no need for a new task, just unblock an existing one).
*
- * waitForWork() takes care of keeping it up-to-date; Task.startTask()
- * uses its current value.
+ * waitForWorkCapability() takes care of keeping it up-to-date;
+ * Task.startTask() uses its current value.
*/
nat rts_n_waiting_tasks = 0;
#endif
*/
nat rts_n_waiting_tasks = 0;
#endif
diff --git
a/ghc/rts/Capability.h
b/ghc/rts/Capability.h
index
71359b6
..
8a3260c
100644
(file)
--- a/
ghc/rts/Capability.h
+++ b/
ghc/rts/Capability.h
@@
-32,10
+32,14
@@
extern void initCapabilities(void);
extern void grabCapability(Capability** pCap);
extern void releaseCapability(Capability* cap);
extern void grabCapability(Capability** pCap);
extern void releaseCapability(Capability* cap);
-#if defined(RTS_SUPPORTS_THREADS)
-/* total number of available capabilities */
extern nat rts_n_free_capabilities;
extern nat rts_n_free_capabilities;
-extern nat rts_n_waiting_workers;
+#if defined(RTS_SUPPORTS_THREADS)
+/* number of worker threads waiting to do good work within
+ the RTS. Used by Task.c (only) to determine whether or not
+ new worker threads needs to be created (when an external call
+ is made).
+ */
+extern nat rts_n_waiting_workers; /* used by Task.c to determine */
extern void grabReturnCapability(Mutex* pMutex, Capability** pCap);
extern void yieldToReturningWorker(Mutex* pMutex, Capability* cap);
extern void grabReturnCapability(Mutex* pMutex, Capability** pCap);
extern void yieldToReturningWorker(Mutex* pMutex, Capability* cap);