Skip to content
  • Duncan Coutts's avatar
    15f4d867
    Initial ./configure support for selecting I/O managers · 15f4d867
    Duncan Coutts authored and Marge Bot's avatar Marge Bot committed
    
    
    In this patch we just define new CPP vars, but don't yet use them
    or replace the existing approach. That will follow.
    
    The intention here is that every I/O manager can be enabled/disabled at
    GHC build time (subject to some constraints). More than one I/O manager
    can be enabled to be built. At least one I/O manager supporting the
    non-threaded RTS must be enabled as well as at least one supporting the
    non-threaded RTS. The I/O managers enabled here will become the choices
    available at runtime at RTS startup (in later patches). The choice can
    be made with RTS flags. There are separate sets of choices for the
    threaded and non-threaded RTS ways, because most I/O managers are
    specific to these ways. Furthermore we must establish a default I/O
    manager for the threaded and non-threaded RTS.
    
    Most I/O managers are platform-specific so there are checks to ensure
    each one can be enabled on the platform. Such checks are also where (in
    future) any system dependencies (e.g. libraries) can be checked.
    
    The output is a set of CPP flags (in the mk/config.h file), with one
    flag per named I/O manager:
    * IOMGR_BUILD_<name>                : which ones should be built (some)
    * IOMGR_DEFAULT_NON_THREADED_<name> : which one is default (exactly one)
    * IOMGR_DEFAULT_THREADED_<name>     : which one is default (exactly one)
    
    and a set of derived flags in IOManager.h
    
    * IOMGR_ENABLED_<name>              : enabled for the current RTS way
    
    Note that IOMGR_BUILD_<name> just says that an I/O manager will be
    built for _some_ RTS way (i.e. threaded or non-threaded). The derived
    flags IOMGR_ENABLED_<name> in IOManager.h say if each I/O manager is
    enabled in the "current" RTS way. These are the ones that can be used
    for conditional compilation of the I/O manager code.
    
    Co-authored-by: default avatarPi Delport <pi@well-typed.com>
    15f4d867
    Initial ./configure support for selecting I/O managers
    Duncan Coutts authored and Marge Bot's avatar Marge Bot committed
    
    
    In this patch we just define new CPP vars, but don't yet use them
    or replace the existing approach. That will follow.
    
    The intention here is that every I/O manager can be enabled/disabled at
    GHC build time (subject to some constraints). More than one I/O manager
    can be enabled to be built. At least one I/O manager supporting the
    non-threaded RTS must be enabled as well as at least one supporting the
    non-threaded RTS. The I/O managers enabled here will become the choices
    available at runtime at RTS startup (in later patches). The choice can
    be made with RTS flags. There are separate sets of choices for the
    threaded and non-threaded RTS ways, because most I/O managers are
    specific to these ways. Furthermore we must establish a default I/O
    manager for the threaded and non-threaded RTS.
    
    Most I/O managers are platform-specific so there are checks to ensure
    each one can be enabled on the platform. Such checks are also where (in
    future) any system dependencies (e.g. libraries) can be checked.
    
    The output is a set of CPP flags (in the mk/config.h file), with one
    flag per named I/O manager:
    * IOMGR_BUILD_<name>                : which ones should be built (some)
    * IOMGR_DEFAULT_NON_THREADED_<name> : which one is default (exactly one)
    * IOMGR_DEFAULT_THREADED_<name>     : which one is default (exactly one)
    
    and a set of derived flags in IOManager.h
    
    * IOMGR_ENABLED_<name>              : enabled for the current RTS way
    
    Note that IOMGR_BUILD_<name> just says that an I/O manager will be
    built for _some_ RTS way (i.e. threaded or non-threaded). The derived
    flags IOMGR_ENABLED_<name> in IOManager.h say if each I/O manager is
    enabled in the "current" RTS way. These are the ones that can be used
    for conditional compilation of the I/O manager code.
    
    Co-authored-by: default avatarPi Delport <pi@well-typed.com>
Loading