Tagged articles
1 articles
Page 1 of 1
Liangxu Linux
Liangxu Linux
Jun 16, 2024 · Fundamentals

Build a Cooperative Multitasking System in C Using setjmp/longjmp

This article explains how to use the C standard library functions setjmp and longjmp to create a lightweight cooperative multitasking scheduler without timers, covering their mechanics, stack handling, task creation, time‑slice yielding, and provides complete example code and a Git repository link.

Ccooperative multitaskinglongjmp
0 likes · 7 min read
Build a Cooperative Multitasking System in C Using setjmp/longjmp