Skip to content
Snippets Groups Projects
Commit c93f11fe authored by Ben Gamari's avatar Ben Gamari
Browse files

rts: Fix timer initialization

Previously `initScheduler` would attempt to pause the ticker and in so
doing acquire the ticker mutex. However, initTicker, which is
responsible for initializing said mutex, hadn't been called
yet.
parent 2161aed8
No related branches found
No related tags found
No related merge requests found
...@@ -232,6 +232,13 @@ hs_init_ghc(int *argc, char **argv[], RtsConfig rts_config) ...@@ -232,6 +232,13 @@ hs_init_ghc(int *argc, char **argv[], RtsConfig rts_config)
/* Initialise libdw session pool */ /* Initialise libdw session pool */
libdwPoolInit(); libdwPoolInit();
/* Start the "ticker" and profiling timer but don't start until the
* scheduler is up. However, the ticker itself needs to be initialized
* before the scheduler to ensure that the ticker mutex is initialized as
* moreCapabilities will attempt to acquire it.
*/
initTimer();
/* initialise scheduler data structures (needs to be done before /* initialise scheduler data structures (needs to be done before
* initStorage()). * initStorage()).
*/ */
...@@ -314,7 +321,6 @@ hs_init_ghc(int *argc, char **argv[], RtsConfig rts_config) ...@@ -314,7 +321,6 @@ hs_init_ghc(int *argc, char **argv[], RtsConfig rts_config)
initHeapProfiling(); initHeapProfiling();
/* start the virtual timer 'subsystem'. */ /* start the virtual timer 'subsystem'. */
initTimer();
startTimer(); startTimer();
#if defined(RTS_USER_SIGNALS) #if defined(RTS_USER_SIGNALS)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment