projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2005-11-03 16:34:45 by simonmar]
[ghc-hetmet.git]
/
ghc
/
rts
/
Main.c
diff --git
a/ghc/rts/Main.c
b/ghc/rts/Main.c
index
0b937df
..
520a757
100644
(file)
--- a/
ghc/rts/Main.c
+++ b/
ghc/rts/Main.c
@@
-49,17
+49,7
@@
int main(int argc, char *argv[])
SchedulerStatus status;
/* all GranSim/GUM init is done in startupHaskell; sets IAmMainThread! */
SchedulerStatus status;
/* all GranSim/GUM init is done in startupHaskell; sets IAmMainThread! */
-#if defined(PROFILING) || defined(mingw32_HOST_OS)
- /* mingw32 and PROFILING (still) define __stginits in .text */
startupHaskell(argc,argv,__stginit_ZCMain);
startupHaskell(argc,argv,__stginit_ZCMain);
-#else
- startupHaskell(argc,argv,NULL);
-#endif
-
- /* Register this thread as a task, so we can get timing stats about it */
-#if defined(RTS_SUPPORTS_THREADS)
- threadIsTask(osThreadId());
-#endif
/* kick off the computation by creating the main thread with a pointer
to mainIO_closure representing the computation of the overall program;
/* kick off the computation by creating the main thread with a pointer
to mainIO_closure representing the computation of the overall program;
@@
-111,9
+101,12
@@
int main(int argc, char *argv[])
# else /* !PAR && !GRAN */
/* ToDo: want to start with a larger stack size */
# else /* !PAR && !GRAN */
/* ToDo: want to start with a larger stack size */
- rts_lock();
- status = rts_evalLazyIO((HaskellObj)mainIO_closure, NULL);
- rts_unlock();
+ {
+ void *cap = rts_lock();
+ cap = rts_evalLazyIO(cap,(HaskellObj)mainIO_closure, NULL);
+ status = rts_getSchedStatus(cap);
+ rts_unlock(cap);
+ }
# endif /* !PAR && !GRAN */
# endif /* !PAR && !GRAN */