HomeClusterLabs Projects
Diffusion LibQB 9b3be0b4509e

ringbuffer: use atomic ops on ringbuffer chunk magic

Description

ringbuffer: use atomic ops on ringbuffer chunk magic

The ringbuffer protocol uses the chunk magic number to indicate to the
other side what state a chunk is in. It's therefore important to use
strongly ordered memory writes to make sure that neither the compiler
nor the CPU change the apparent order of the writes, since that would
result in corrupted messages.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>

Details

Provenance
Jeremy Fitzhardinge <jeremy@goop.org>Authored on Apr 23 2013, 8:13 PM
Angus Salkeld <asalkeld@redhat.com>Committed on Apr 23 2013, 9:57 PM
Parents
rQ6d7da398665d: Remove some test code mistakenly committed to the example program.
Branches
Unknown
Tags
Unknown

Event Timeline