Change the handling of the RTS flag --io-manager=
Now instead of it being just used on Windows to select between the WinIO vs the MIO or Win32-legacy I/O managers, it is now used on all platforms for selecting the I/O manager to use. Right now it remains the case that there is only an actual choice on Windows, but that will change later. Document the --io-manager flag in the user guide. This change is also reflected in the RTS flags types in the base library. Deprecate the export of IoSubSystem from GHC.RTS.Flags with a message to import it from GHC.IO.Subsystem. The way the 'IoSubSystem' is detected also changes. Instead of looking at the RTS flag, there is now a C bool global var in the RTS which gets set on startup when the I/O manager is selected. This bool var says whether the selected I/O manager classifies as "native" on Windows, which in practice means the WinIO I/O manager has been selected. Similarly, the is_io_mng_native_p RTS helper function is re-implemented in terms of the selected I/O manager, rather than based on the RTS flags. We do however remove the ./configure --native-io-manager flag because we're bringing the WinIO/MIO/Win32-legacy choice under the new general scheme for selecting I/O managers, and that new scheme involves no ./configure time user choices, just runtime RTS flag choices.
Showing
- docs/users_guide/runtime_control.rst 17 additions, 0 deletionsdocs/users_guide/runtime_control.rst
- libraries/base/src/GHC/RTS/Flags.hs 4 additions, 2 deletionslibraries/base/src/GHC/RTS/Flags.hs
- libraries/ghc-internal/src/GHC/Internal/IO/SubSystem.hs 43 additions, 3 deletionslibraries/ghc-internal/src/GHC/Internal/IO/SubSystem.hs
- libraries/ghc-internal/src/GHC/Internal/RTS/Flags.hsc 10 additions, 59 deletionslibraries/ghc-internal/src/GHC/Internal/RTS/Flags.hsc
- rts/IOManager.c 184 additions, 0 deletionsrts/IOManager.c
- rts/IOManager.h 54 additions, 0 deletionsrts/IOManager.h
- rts/RtsFlags.c 21 additions, 25 deletionsrts/RtsFlags.c
- rts/RtsFlags.h 0 additions, 1 deletionrts/RtsFlags.h
- rts/RtsSymbols.c 2 additions, 0 deletionsrts/RtsSymbols.c
- rts/configure.ac 0 additions, 10 deletionsrts/configure.ac
- rts/include/rts/Flags.h 17 additions, 3 deletionsrts/include/rts/Flags.h
Loading
Please register or sign in to comment