Skip to content

Lock-Free Single-Producer-Single-Consumer String Circular Queue in C

Notifications You must be signed in to change notification settings

hellochenwang/queue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

queue

Lock-Free Single-Producer-Single-Consumer String Circular Queue in C

two threads, one thread adding to the queue, the other thread taking from the queue. no locking, no mutex operations.

steps to use:

  1. set the maximum element size - #define MAX_ELEMENT_SIZE 255 + 1

  2. createQueue(int maxSize) - maxSize is how many elements max does this queue hold.

  3. enqueue/dequeue/count

  4. freeQueue(q)

About

Lock-Free Single-Producer-Single-Consumer String Circular Queue in C

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages