Process synchronize with CAS
From: qiqi tang <hidden>
Date: 2024-03-18 14:17:39
Hi, everyone
I am interested in the interface of linux. As we all know, there
is CAS way to accomplish the lockless ring buffer with the kernel .
The kernel api can realize the datastruct Such as
__sync_fetch_and_add type __sync_fetch_and_sub (type * ptr, type
value, ...) and so on
But I find the limitation that this CAS is work good for the thread
model rather than Process model . I want to create a shared Memory
and use mmap API to mount this shared memory into producter and
consumer process. What should I do to realize the synchronization
using the CAS algorithm . Are there have any API can over cross
Multi-Process just like the thread model? I would appreciate that
someone can provide the information for this email. Thank you!
Regards,
Jack