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:
40d9766
)
[project @ 2002-02-14 08:59:29 by sof]
author
sof
<unknown>
Thu, 14 Feb 2002 08:59:29 +0000
(08:59 +0000)
committer
sof
<unknown>
Thu, 14 Feb 2002 08:59:29 +0000
(08:59 +0000)
debugged
ghc/rts/Capability.c
patch
|
blob
|
history
diff --git
a/ghc/rts/Capability.c
b/ghc/rts/Capability.c
index
77096a9
..
e979507
100644
(file)
--- a/
ghc/rts/Capability.c
+++ b/
ghc/rts/Capability.c
@@
-68,7
+68,7
@@
void
initCapabilities()
{
#if defined(RTS_SUPPORTS_THREADS)
initCapabilities()
{
#if defined(RTS_SUPPORTS_THREADS)
- initCondition(returning_worker_cond);
+ initCondition(&returning_worker_cond);
#endif
#if defined(SMP)
#endif
#if defined(SMP)
@@
-177,12
+177,12
@@
void
grabReturnCapability(Capability** pCap)
{
IF_DEBUG(scheduler,
grabReturnCapability(Capability** pCap)
{
IF_DEBUG(scheduler,
- sched_belch("thread %d: returning, waiting for sched. lock.\n", osThreadId()));
+ fprintf(stderr,"worker (%ld): returning, waiting for sched. lock.\n", osThreadId()));
ACQUIRE_LOCK(&sched_mutex);
rts_n_waiting_workers++;
IF_DEBUG(scheduler,
ACQUIRE_LOCK(&sched_mutex);
rts_n_waiting_workers++;
IF_DEBUG(scheduler,
- sched_belch("worker (%d,%d): returning; workers waiting: %d\n",
- tok, osThreadId(), rts_n_waiting_workers));
+ fprintf(stderr,"worker (%ld): returning; workers waiting: %d\n",
+ osThreadId(), rts_n_waiting_workers));
while ( noCapabilities() ) {
waitCondition(&returning_worker_cond, &sched_mutex);
}
while ( noCapabilities() ) {
waitCondition(&returning_worker_cond, &sched_mutex);
}
@@
-208,7
+208,7
@@
void
yieldCapability(Capability* cap)
{
IF_DEBUG(scheduler,
yieldCapability(Capability* cap)
{
IF_DEBUG(scheduler,
- sched_belch("worker thread (%d): giving up RTS token\n", osThreadId()));
+ fprintf(stderr,"worker thread (%ld): giving up RTS token\n", osThreadId()));
releaseCapability(cap);
RELEASE_LOCK(&sched_mutex);
yieldThread();
releaseCapability(cap);
RELEASE_LOCK(&sched_mutex);
yieldThread();