Skip to content
  • Simon Marlow's avatar
    Fix an extremely subtle deadlock bug on x86_64 · 6d316585
    Simon Marlow authored
    The recent_activity flag was an unsigned int, but we sometimes do a
    64-bit xchg() on it, which overwrites the next word in memory.  This
    happened to contain the sched_state flag, which is used to control the
    orderly shutdown of the system.  If the xchg() happened during
    shutdown, the scheduler would get confused and deadlock.  Don't you
    just love C?
    6d316585