-
The token-based approach for detecting preemption while data is being moved into or out of the ring only protects from read vs read races, not from races involving a write side. For instance, a reader might read dirty data being changed by a writer concurrently, or two writers might compete writing two distinct messages at the same place in the ring space. To address this issue, use a slot-based implementation which atomically reserves exclusive portions of the ring space readers and writers will be accessing locklessly. Those slots are guaranteed to never overlap among read and write requests, until the lockless operation finishes. Signed-off-by: Philippe Gerum <rpm@xenomai.org> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
a3a76644