Description
Currently, when creating a thread, parameters are passed via an argc/argv mechanism.
This issue is split into two parts.
-
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. -
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>
.