projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2001-10-23 11:28:51 by simonmar]
[ghc-hetmet.git]
/
ghc
/
rts
/
Schedule.c
diff --git
a/ghc/rts/Schedule.c
b/ghc/rts/Schedule.c
index
425551c
..
b2fb90a
100644
(file)
--- a/
ghc/rts/Schedule.c
+++ b/
ghc/rts/Schedule.c
@@
-1,5
+1,5
@@
/* ---------------------------------------------------------------------------
/* ---------------------------------------------------------------------------
- * $Id: Schedule.c,v 1.97 2001/07/23 17:23:19 simonmar Exp $
+ * $Id: Schedule.c,v 1.102 2001/10/23 11:28:51 simonmar Exp $
*
* (c) The GHC Team, 1998-2000
*
*
* (c) The GHC Team, 1998-2000
*
@@
-74,6
+74,7
@@
//@node Includes, Variables and Data structures, Main scheduling code, Main scheduling code
//@subsection Includes
//@node Includes, Variables and Data structures, Main scheduling code, Main scheduling code
//@subsection Includes
+#include "PosixSource.h"
#include "Rts.h"
#include "SchedAPI.h"
#include "RtsUtils.h"
#include "Rts.h"
#include "SchedAPI.h"
#include "RtsUtils.h"
@@
-444,6
+445,7
@@
schedule( void )
pthread_cond_broadcast(&m->wakeup);
break;
case ThreadKilled:
pthread_cond_broadcast(&m->wakeup);
break;
case ThreadKilled:
+ if (m->ret) *(m->ret) = NULL;
*prev = m->link;
if (was_interrupted) {
m->stat = Interrupted;
*prev = m->link;
if (was_interrupted) {
m->stat = Interrupted;
@@
-476,6
+478,7
@@
schedule( void )
m->stat = Success;
return;
} else {
m->stat = Success;
return;
} else {
+ if (m->ret) { *(m->ret) = NULL; };
if (was_interrupted) {
m->stat = Interrupted;
} else {
if (was_interrupted) {
m->stat = Interrupted;
} else {
@@
-581,12
+584,14
@@
schedule( void )
StgMainThread *m = main_threads;
#ifdef SMP
for (; m != NULL; m = m->link) {
StgMainThread *m = main_threads;
#ifdef SMP
for (; m != NULL; m = m->link) {
+ deleteThread(m->tso);
m->ret = NULL;
m->stat = Deadlock;
pthread_cond_broadcast(&m->wakeup);
}
main_threads = NULL;
#else
m->ret = NULL;
m->stat = Deadlock;
pthread_cond_broadcast(&m->wakeup);
}
main_threads = NULL;
#else
+ deleteThread(m->tso);
m->ret = NULL;
m->stat = Deadlock;
main_threads = m->link;
m->ret = NULL;
m->stat = Deadlock;
main_threads = m->link;
@@
-2092,7
+2097,8
@@
take_off_run_queue(StgTSO *tso) {
KH @ 25/10/99
*/
KH @ 25/10/99
*/
-static void GetRoots(evac_fn evac)
+static void
+GetRoots(evac_fn evac)
{
StgMainThread *m;
{
StgMainThread *m;
@@
-2920,7
+2926,7
@@
raiseAsync(StgTSO *tso, StgClosure *exception)
}
while (1) {
}
while (1) {
- int words = ((P_)su - (P_)sp) - 1;
+ nat words = ((P_)su - (P_)sp) - 1;
nat i;
StgAP_UPD * ap;
nat i;
StgAP_UPD * ap;