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

Move __thread_local_inner to sys #108927

Merged
merged 3 commits into from
Mar 11, 2023
Merged

Move __thread_local_inner to sys #108927

merged 3 commits into from
Mar 11, 2023

Commits on Mar 10, 2023

  1. Move __thread_local_inner to sys

    Move __thread_local_inner macro in crate::thread::local to crate::sys.
    Currently, the tidy check does not fail for `library/std/src/thread/local.rs` even though it contains platform specific code. This is beacause target_family did not exist at the time the tidy checks were written [1].
    
    [1]: rust-lang#105861 (comment)
    
    Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
    Ayush1325 committed Mar 10, 2023
    Configuration menu
    Copy the full SHA
    ffa9019 View commit details
    Browse the repository at this point in the history
  2. Split __thread_local_inner macro

    Split the __thread_local_inner macro to make it more readable. Also move
    everything to crate::sys::common::thread_local.
    
    Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
    Ayush1325 committed Mar 10, 2023
    Configuration menu
    Copy the full SHA
    45d5021 View commit details
    Browse the repository at this point in the history
  3. Moved thread_local implementation to sys::common

    This allows removing all the platform-dependent code from `library/std/src/thread/local.rs` and `library/std/src/thread/mod.rs`
    
    Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
    Ayush1325 committed Mar 10, 2023
    Configuration menu
    Copy the full SHA
    5828910 View commit details
    Browse the repository at this point in the history