projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add pwd to SUBDIRS, so it gets cleaned
[ghc-hetmet.git]
/
rts
/
Main.c
diff --git
a/rts/Main.c
b/rts/Main.c
index
6aef280
..
5f16fa3
100644
(file)
--- a/
rts/Main.c
+++ b/
rts/Main.c
@@
-12,11
+12,11
@@
#include "Rts.h"
#include "RtsAPI.h"
#include "SchedAPI.h"
#include "Rts.h"
#include "RtsAPI.h"
#include "SchedAPI.h"
-#include "Schedule.h"
#include "RtsFlags.h"
#include "RtsUtils.h"
#include "Prelude.h"
#include "Task.h"
#include "RtsFlags.h"
#include "RtsUtils.h"
#include "Prelude.h"
#include "Task.h"
+#include "seh_excn.h"
#include <stdlib.h>
#ifdef DEBUG
#include <stdlib.h>
#ifdef DEBUG
@@
-49,6
+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! */
+ BEGIN_CATCH
startupHaskell(argc,argv,__stginit_ZCMain);
/* kick off the computation by creating the main thread with a pointer
startupHaskell(argc,argv,__stginit_ZCMain);
/* kick off the computation by creating the main thread with a pointer
@@
-102,9
+103,10
@@
int main(int argc, char *argv[])
/* ToDo: want to start with a larger stack size */
{
/* ToDo: want to start with a larger stack size */
{
- void *cap = rts_lock();
+ Capability *cap = rts_lock();
cap = rts_evalLazyIO(cap,(HaskellObj)(void *)mainIO_closure, NULL);
status = rts_getSchedStatus(cap);
cap = rts_evalLazyIO(cap,(HaskellObj)(void *)mainIO_closure, NULL);
status = rts_getSchedStatus(cap);
+ taskTimeStamp(myTask());
rts_unlock(cap);
}
rts_unlock(cap);
}
@@
-133,6
+135,8
@@
int main(int argc, char *argv[])
barf("main thread completed with invalid status");
}
shutdownHaskellAndExit(exit_status);
barf("main thread completed with invalid status");
}
shutdownHaskellAndExit(exit_status);
- return 0; /* never reached, keep gcc -Wall happy */
+ END_CATCH
+ return 0; /* not reached unless a Windows exception happens,
+ also keeps gcc -Wall happy */
}
# endif /* BATCH_MODE */
}
# endif /* BATCH_MODE */