Skip to content

frenzis01/locklessBuffer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

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

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors