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.
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.