Tagged articles
2 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
Liangxu Linux
Liangxu Linux
May 13, 2023 · Fundamentals

Mastering Error Handling in C: Strategies, Code Samples, and Best Practices

This article provides a comprehensive guide to error handling in C, covering error classification, step‑by‑step handling procedures, return‑value and out‑parameter techniques, global errno usage, goto and setjmp/longjmp jumps, signal handling, program termination functions, assertions, and practical encapsulation patterns with full code examples.

AssertCError Handling
0 likes · 31 min read
Mastering Error Handling in C: Strategies, Code Samples, and Best Practices