[GHC] #9285: IO manager startup procedure somewhat odd

GHC ghc-devs at haskell.org
Thu Jul 10 17:33:53 UTC 2014


#9285: IO manager startup procedure somewhat odd
-------------------------------------+------------------------------------
        Reporter:  edsko             |            Owner:
            Type:  bug               |           Status:  new
        Priority:  low               |        Milestone:
       Component:  Compiler          |          Version:  7.8.2
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  None/Unknown      |       Difficulty:  Unknown
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+------------------------------------

Comment (by duncan):

 So I suppose I'm suggesting something like this:

 {{{
 diff --git a/rts/RtsStartup.c b/rts/RtsStartup.c
 index 8e7e11d..38435d8 100644
 --- a/rts/RtsStartup.c
 +++ b/rts/RtsStartup.c
 @@ -258,11 +258,6 @@ hs_init_ghc(int *argc, char **argv[], RtsConfig
 rts_config)
      // ToDo: make this work in the presence of multiple hs_add_root()s.
      initProfiling2();

 -    // ditto.
 -#if defined(THREADED_RTS)
 -    ioManagerStart();
 -#endif
 -
      /* Record initialization times */
      stat_endInit();
 }}}
 {{{
 diff --git a/rts/RtsMain.c b/rts/RtsMain.c
 index df63716..68b2c79 100644
 --- a/rts/RtsMain.c
 +++ b/rts/RtsMain.c
 @@ -60,6 +60,9 @@ static void real_main(void)
      /* ToDo: want to start with a larger stack size */
      {
         Capability *cap = rts_lock();
 +#if defined(THREADED_RTS)
 +       ioManagerStartCap(&cap);
 +#endif
         rts_evalLazyIO(&cap,progmain_closure, NULL);
         status = rts_getSchedStatus(cap);
         rts_unlock(cap);
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9285#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list