Module thread

Source
Expand description

Thread support.

Implement the friendly Thread types used by the zephyr::thread proc macro to declare new threads.

This is intended to be completely usable without alloc, while still allow threads to be started with any arbitrary Send arguments. Threads can be joined, and reused after they have exited. The model intentionally tries to be similar to how async tasks work in something like Embassy, but some changes due to the different semantics of Zephyr threads.

Structs§

InitData
The holder of data that is to be shared with the target thread.
ReadyThread
A thread that has been set up and is ready to start.
RunningThread
A thread that has been started.
Thread
A zephyr thread.
ThreadData
The static data associated with each thread. The stack is kept separate, as it is intended to go into an uninitialized linker section.
ThreadStack
A Zephyr stack declaration.

Enums§

ThreadState
States a Zephyr thread can be in.

Functions§

stack_len
Adjust a given requested stack size up for the alignment. This is just the stack, and the reservation is explicitly included in the stack declaration below.