#include "RtsFlags.h"
#include "RtsUtils.h"
#include "Prelude.h"
+#include "Task.h"
#include <stdlib.h>
#ifdef DEBUG
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);
+#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;