Skip to content

rt: Refactor the functions for getting the current task #2076

Closed
@brson

Description

@brson

Right now the primary mechanism to retrieve the current task pointer out of the ether is rust_task_thread::get_task. This is used everywhere and every time I refactor the scheduler and the name of that class changes involves lots of churn. There is also another method, rust_task::get_task_from_tcb that is used in a few cases and is faster. We should just have one global rust_get_current_task method that first does it the fast way then, if that fails, does it the slow way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions