Expand description

Create, inspect or modify RIOT processes (“threads”)

Tokens

Some thread creation mechanisms (currently only riot_main_with_tokens and not those in here) are “with tokens”. With these, the zero-sized type StartToken is used to pass along the information that the execution is currently happening in a thread, and more importantly that some operations doable only once per thread (eg. setting up a message queue) have not yet happed.

When threads are created that way, they need to return a TerminationToken which ensures that no operations that preclude the termination of a thread have happened.

This has multiple implementations:

  • one wrapping the RIOT (C) core/ API

The right implementation is selected with help from the build system, similar to how std’s platform dependent backends are selected.

Structs

Lifetimed helper through which threads can be spawned.

Wrapper around a valid (not necessarily running, but in-range) riot_sys::kernel_pid_t that provides access to thread details and signaling.

Gathered information about a thread, returned by [KernelPID::stack_stats()].

Data necessary to return from a thread that has received the StartToken permissions.

A StartToken that has possibly already lost some of its properties.

Enums

Functions

PID of the currently active thread

Create a context for starting threads that take shorter than ’static references.

Put the current thread in the “sleeping” state, only to be continue when something calls KernelPID::wakeup() on its PID.

Create a thread with a statically allocated stack

Type Definitions

Data created for each thread that is spawned.