rust-lang / miri

An interpreter for Rust's mid-level intermediate representation
Apache License 2.0
4.16k stars 318 forks source link

Move sched_getaffinity back to Linux #3557

Closed RalfJung closed 2 months ago

RalfJung commented 2 months ago

This reverts commit c1a3f8576ea12b0bed68ad3dedf4069ca3d9816f. The shim isn't actually useful for anything, and it is untested on FreeBSD. On Linux it exists solely because std and num_cpus are trying this before falling back to sysconf, but on FreeBSD that's not how they work, so there's no reason I can see to have this stub shim on FreeBSD.

RalfJung commented 2 months ago

@devnexen do you have a use-case where adding this function (always returning EINVAL) actually helps? If so, we should add a test, but otherwise I'd prefer to revert.

devnexen commented 2 months ago

might be wiser to revert we can always add back if context changes.

RalfJung commented 2 months ago

Okay, thanks for clarifying! @bors r+

bors commented 2 months ago

:pushpin: Commit ad60e8b6340ac72d51adaa175483e6379b6bbc57 has been approved by RalfJung

It is now in the queue for this repository.

bors commented 2 months ago

:hourglass: Testing commit ad60e8b6340ac72d51adaa175483e6379b6bbc57 with merge 9a7c1240ce46b719f64611712fcfea0ac070eda4...

bors commented 2 months ago

:sunny: Test successful - checks-actions Approved by: RalfJung Pushing 9a7c1240ce46b719f64611712fcfea0ac070eda4 to master...