From: qiqi tang <tangonepiece007@gmail.com>
To: linux-api@vger.kernel.org
Subject: Process synchronize with CAS
Date: Mon, 18 Mar 2024 22:17:27 +0800 [thread overview]
Message-ID: <CAPKn_0JW+KmggV899zEjY7vu54cgY246k7yTw++Wh8tkdZrx5A@mail.gmail.com> (raw)
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
reply other threads:[~2024-03-18 14:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAPKn_0JW+KmggV899zEjY7vu54cgY246k7yTw++Wh8tkdZrx5A@mail.gmail.com \
--to=tangonepiece007@gmail.com \
--cc=linux-api@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).