Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup cfgs in unix module #1812

Merged
merged 4 commits into from
Jun 21, 2024
Merged

Cleanup cfgs in unix module #1812

merged 4 commits into from
Jun 21, 2024

Commits on Jun 21, 2024

  1. Remove duplicated selector cfg

    Using the old method in src/sys/unix/selector/mod.rs we needed to define
    all the targets twice, now we just do it once and set the path to the
    correct selector implementation.
    
    Note that is only possible because we increased MSRV so that it supports
    the path attribute, when the code was originally written this was not a
    thing.
    Thomasdezeeuw committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    d092dbb View commit details
    Browse the repository at this point in the history
  2. Move IoSourceState logic to selector files

    The old macro was a mess of not(any(targets...)), means that when
    porting to a new target you always used the stateless implementation
    even if you didn't know about it.
    
    This fixes gotcha that and moves the logic of what kind of IoSourceState
    to use to the selector implemtnation files, which means that we don't
    have to worry about it when porting to a new platform.
    Thomasdezeeuw committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    df2d585 View commit details
    Browse the repository at this point in the history
  3. Remove compile_error in pipe module

    Initially I though this would give a nice error message saying that
    platform X wasn't supported. But due to the amount of other errors the
    error message is still not great.
    
    So, to make porting easier in the future, just remove this and we'll get
    a `fds` not defined error.
    Thomasdezeeuw committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    15d951d View commit details
    Browse the repository at this point in the history
  4. Reexport everything from sys::unix::selector

    Means we can remove the cfg_io_source! macro usage as that is already
    done in the selector implementation file.
    Thomasdezeeuw committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    2979ce7 View commit details
    Browse the repository at this point in the history