Skip to content
systemcoding.dev

Tag

c

362 posts

Flat illustration of parallel threads meeting at a mutex, with the C, Go and Erlang logos.
Concurrency

Create and Join Threads with pthread_create

Start threads with pthread_create, wait for them with pthread_join and check the error codes correctly. Includes a complete C program and the mistakes to avoid.

7 min read
Flat illustration of RTOS tasks taking turns on a timeline, with the C, Espressif and Arm logos.
RTOS

Create Zephyr Threads With K_THREAD_DEFINE

Use K_THREAD_DEFINE to create a Zephyr thread at build time, with stack size, priority and start delay, plus the thread entry signature and how to stop it.

6 min read
Flat illustration of two options weighed side by side, with the C, Linux and Rust logos.
Networking

Blocking vs Non-Blocking I/O Explained

Learn what blocking and non-blocking I/O mean for sockets on POSIX, what EAGAIN tells you, and why servers with many clients switch to non-blocking mode.

6 min read
Flat illustration of source code passing through a compiler and linker into a binary, with the C, GNU and LLVM logos.
Toolchains

Write Your First Makefile for a C Program

Write a working Makefile for a small C program with a compiler variable, flags, object files and a clean target, and see how make decides what to rebuild.

6 min read