Miscellaneous RTS I/O manager refactoring, improvemnts and minor features

Following on from !16029 (merged), this MR includes a miscellaneous collection of minor changes in preparation for fixing idle GC and improving deadlock detection, both on the non-threaded RTS (issues #27040 and #26408). In some sense we're just splitting up MR !14820 to make it a bit more manageable to review.

Ignore the initial patches that are in !16029 (merged). This MR only contains 16 patches, not 33!

This MR includes:

  • Fixing the order of the Capability struct so that deriveConstants can make correct CMM field accessor macros (see also #27346).
  • Improvements to the consistency and encapsulation of the I/O manager API
  • Promote the MIO I/O manager to live in its own file, like other I/O managers do. This improves comprehension.
  • Some renaming, moving code and removing unused code
  • Adding a couple TODOs/FIXMEs to the code
  • Minor code comment improvements
  • Add the ability to free per-cap resources in the in-RTS I/O managers, and use this in the appropriate places
  • Stop exporting RTS private I/O manager related symbols on Windows
  • Remove now-unused wakeupIOManager and related unused things
  • Add new interruptIOManager API and add support for all in-RTS non-threaded I/O managers except WinIO (see issue #27403)
Edited by Duncan Coutts

Merge request reports

Loading