atomicx
AtomicX is a cooperative multitasking library written in pure C++ for single-core embedded development and general applications. It runs on microcontrollers and processors including AVR, RISC-V, ARM, Teensy, ESP, and also on Windows, Linux, and macOS, and is compatible with several RTOS environments. The library uses zero stack displacement, relying only on setjmp and longjmp with no assembly or platform-specific code in the core. It offers two stack modes: fixed-size user-provided buffers requiring zero heap allocation, and self-managed auto-resizing stacks. It is suitable for MCUs with as little as 512 bytes of RAM, including ATtiny85. AtomicX provides a rich set of inter-process communication primitives including wait and notify signaling, thread-safe queues, semaphores, read-write mutexes with RAII smartMutex and smartSemaphore wrappers, data pipes based on send and receive, and a broadcast messaging system using sizet messages with sizet tags. It also includes smart pointers for minimal environments. Thr