std1.0.0-beta-7 SafeC docs

Module sync::thread_bare

#include <std/sync/thread_bare.h> source

Freestanding Cooperative Threads Priority-aware wrapper over TaskScheduler. Freestanding-safe.

Thread functions use the same coroutine protocol as TaskScheduler:

int func(?&T arg, int resume_point)
Returns > 0 to yield (value = new resume_point), 0 when done.

Threads with higher priority values run before lower-priority ones within each scheduling tick.

Structs

ThreadSched

Newtypes

Thread

Macros

THREAD_MAX
THREAD_NONE