f9micro / f9-kernel

An efficient and secure microkernel built for ARM Cortex-M cores, inspired by L4
Other
679 stars 145 forks source link

Initializing thread state when starting a new thread using generic thread function. #158

Closed ab1aw closed 5 years ago

ab1aw commented 5 years ago

This is a user application to demonstrate how to implement and execute a generic thread function whose starting state can be modified by the parent thread. In this demonstration, the parent thread spawns three instances of the generic thread function as three separate threads. Each thread instance is given different starting state data. This allows a work-around for the missing capability in F9 to pass an argument to the arg parameter of a thread via the pager_start_thread() API.

This user application also demonstrates how threads might use the F9 IPC to communicate with each other.