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

Restructure std::rt #89011

Merged
merged 8 commits into from
Sep 29, 2021
Merged

Restructure std::rt #89011

merged 8 commits into from
Sep 29, 2021

Commits on Sep 16, 2021

  1. Merge sys_common::rt into rt

    bjorn3 committed Sep 16, 2021
    Configuration menu
    Copy the full SHA
    6f6bb16 View commit details
    Browse the repository at this point in the history
  2. Remove an allocation from rt::init

    Previously the thread name would first be heap allocated and then
    re-allocated to add a nul terminator. Now it will be heap allocated only
    once with nul terminator added form the start.
    bjorn3 committed Sep 16, 2021
    Configuration menu
    Copy the full SHA
    af7eede View commit details
    Browse the repository at this point in the history
  3. Optimize ThreadInfo::with

    The RefCell is now borrowed exactly once. In addition a code sequence
    that contains an unwrap that is guaranteed to never panic at runtime is
    replaced with get_or_insert_with, which makes the intended behavior
    clearer and will not emit code to panic even without optimizations.
    bjorn3 committed Sep 16, 2021
    Configuration menu
    Copy the full SHA
    f78cd44 View commit details
    Browse the repository at this point in the history
  4. Use const {} for the THREAD_INFO thread local

    This makes accesses to it cheaper
    bjorn3 committed Sep 16, 2021
    Configuration menu
    Copy the full SHA
    a8bb3bc View commit details
    Browse the repository at this point in the history
  5. Remove unused function

    bjorn3 committed Sep 16, 2021
    Configuration menu
    Copy the full SHA
    1ad44b2 View commit details
    Browse the repository at this point in the history
  6. Replace a couple of asserts with rtassert! in rt code

    This replaces a couple of panic locations with hard aborts. The panics
    can't be catched by the user anyway in these locations.
    bjorn3 committed Sep 16, 2021
    Configuration menu
    Copy the full SHA
    cb14269 View commit details
    Browse the repository at this point in the history
  7. Merge two THREAD_INFO.with and following RefCell borrow

    This is a bit faster
    bjorn3 committed Sep 16, 2021
    Configuration menu
    Copy the full SHA
    5e7f641 View commit details
    Browse the repository at this point in the history
  8. Rustfmt

    bjorn3 committed Sep 16, 2021
    Configuration menu
    Copy the full SHA
    37608c7 View commit details
    Browse the repository at this point in the history