Duncan Coutts pushed to branch wip/io-manager-deadlock-detection at Glasgow Haskell Compiler / GHC

Commits:

5 changed files:

Changes:

  • rts/IOManager.h
    ... ... @@ -269,6 +269,8 @@ void initCapabilityIOManager(CapIOManager *iomgr);
    269 269
      */
    
    270 270
     void freeCapabilityIOManager(CapIOManager *iomgr, bool after_fork);
    
    271 271
     
    
    272
    +// FIXME: turns out we do not need the bool after_fork. Simplify and rebase.
    
    273
    +
    
    272 274
     /* CapIOManager life cycle:
    
    273 275
      *
    
    274 276
      * alloc -> init -> free -> free struct (!after_fork)
    

  • rts/posix/MIO.c
    ... ... @@ -22,10 +22,6 @@
    22 22
     # include <errno.h>
    
    23 23
     #endif
    
    24 24
     
    
    25
    -#if defined(HAVE_EVENTFD_H)
    
    26
    -# include <sys/eventfd.h>
    
    27
    -#endif
    
    28
    -
    
    29 25
     #include <stdlib.h>
    
    30 26
     #include <unistd.h>
    
    31 27
     
    

  • rts/posix/Poll.c
    ... ... @@ -158,9 +158,7 @@ void initCapabilityIOManagerPoll(CapIOManager *iomgr)
    158 158
     void freeCapabilityIOManagerPoll(CapIOManager *iomgr, bool after_fork)
    
    159 159
     {
    
    160 160
         stgFree(iomgr->full_poll_table);
    
    161
    -    if (!after_fork) {
    
    162
    -        closeFdWakeup(iomgr->wakeup_fd_r, iomgr->wakeup_fd_w);
    
    163
    -    }
    
    161
    +    closeFdWakeup(iomgr->wakeup_fd_r, iomgr->wakeup_fd_w);
    
    164 162
     }
    
    165 163
     
    
    166 164
     
    

  • rts/posix/Select.c
    ... ... @@ -66,9 +66,7 @@ void initCapabilityIOManagerSelect(CapIOManager *iomgr)
    66 66
     
    
    67 67
     void freeCapabilityIOManagerSelect(CapIOManager *iomgr, bool after_fork)
    
    68 68
     {
    
    69
    -    if (!after_fork) {
    
    70
    -        closeFdWakeup(iomgr->wakeup_fd_r, iomgr->wakeup_fd_w);
    
    71
    -    }
    
    69
    +    closeFdWakeup(iomgr->wakeup_fd_r, iomgr->wakeup_fd_w);
    
    72 70
     }
    
    73 71
     
    
    74 72
     void wakeupIOManagerSelect(CapIOManager *iomgr)
    

  • rts/posix/Signals.c
    ... ... @@ -37,10 +37,6 @@
    37 37
     # include <errno.h>
    
    38 38
     #endif
    
    39 39
     
    
    40
    -#if defined(HAVE_EVENTFD_H)
    
    41
    -# include <sys/eventfd.h>
    
    42
    -#endif
    
    43
    -
    
    44 40
     #if defined(HAVE_TERMIOS_H)
    
    45 41
     #include <termios.h>
    
    46 42
     #endif