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-04-27 17:13:13 by sof]
[ghc-hetmet.git]
/
ghc
/
rts
/
Main.c
diff --git
a/ghc/rts/Main.c
b/ghc/rts/Main.c
index
7721438
..
0b937df
100644
(file)
--- a/
ghc/rts/Main.c
+++ b/
ghc/rts/Main.c
@@
-16,6
+16,7
@@
#include "RtsFlags.h"
#include "RtsUtils.h"
#include "Prelude.h"
#include "RtsFlags.h"
#include "RtsUtils.h"
#include "Prelude.h"
+#include "Task.h"
#include <stdlib.h>
#ifdef DEBUG
#include <stdlib.h>
#ifdef DEBUG
@@
-48,7
+49,17
@@
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;