shawnanastasio / libkvmchan

An implementation of the Xen vchan API on KVM
Other
10 stars 4 forks source link

Modify ringbuf to remove `full` flag #4

Closed shawnanastasio closed 5 years ago

shawnanastasio commented 5 years ago

As pointed out in #1, the usage of a full flag that can be written by both parties introduces a race condition that can only be mitigated with expensive locks.

Instead, the technique of wasting a single byte in the ring buffer itself to indicate full/empty status should be used.