Skip to content

Kernel/ocortex-m: Proper parameter passing for service creation #19

Open
@thomasw04

Description

@thomasw04

Currently, when creating a thread, parameters are passed via an argc/argv mechanism.

This issue is split into two parts.

  1. Currently argv is just passed as a pointer-to-array-of-pointers as is.
    When creating a thread the actual data behind argv has to be copied to the data section of the corresponding task. This section should be at the top of the allocation of the task, after the stack top.

  2. When creating services an additional mechanism has to be added. An instance of the struct used for the service shall be allocated/moved into the data section of the corresponding task and a pointer to this struct shall be passed as the first argument to the main function. If possible this should be hidden behind a proc-macro implementation and the developer of the service should get a Box<T>.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions