Skip to content

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Lockless Circular Buffer

Lockless circular buffer in a Single-Producer Single-Consumer scenario.

Demo

clang buffer.c -o buffer -pthread

./buffer

Implementation

Every buffer node has a void* pointer and a status volatile boolean which indicates whether the node has been read or not. reader and rriter can use this status flag to determine whether the buffer is full or not.

For demonstrating purposes, the writer puts in the buffer random integer and the reader simply prints it to stdout

About

Lockless SPSC

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages