Fading Coder

An Old Coder’s Final Dance

GCC dependency generation: -M, -MM, -MD, -MMD, -MF, -MT

These options drive how GCC emits Makefile-style dependency rules. They’re useful for incremental builds that only recompile what chenged. Example source Create a tiny program to reference in the examples: // deps.c #include <stdio.h> int main(void) { int value = 21 * 2; printf("%d\n"...

Building a Minimal Thread Pool in C with POSIX Threads

Thread pools are a common concurrency primitive for servers and systems programming. Instead of creating a thread for each task, a thread pool maintains a fixed set of worker threads that pull work items from a shared queue. This approach cuts thread creation/destruction overhead and keeps latency l...