Video Coming Soon...

Created by Zed A. Shaw Updated 2026-11-26 20:48:52
 

WARNING: This exercise needs a full review to match recent changes to C. If you find problems please report them with the bug feature (top right, bug icon).

41: Ring Buffer

Ring buffers are incredibly useful when processing asynchronous I/O. They allow one side to receive data in random intervals of random sizes, but feed cohesive chunks to another side in set sizes or intervals. They are a variant on the Queue data structure but focus on blocks of bytes instead of a list of pointers. In this exercise, I'm going to show you the RingBuffer code, and then have you make a full unit test for it.

View Source file liblcthw/src/lcthw/ringbuffer.h Only

Previous Lesson Next Lesson

Register for From Impostor to Programmer

Register today for the course and get the all currently available videos and lessons, plus all future modules for no extra charge.