From: Alice Ryhl <aliceryhl@google.com>
To: Boqun Feng <boqun.feng@gmail.com>
Cc: "Miguel Ojeda" <ojeda@kernel.org>,
"Peter Zijlstra" <peterz@infradead.org>,
"Ingo Molnar" <mingo@redhat.com>, "Will Deacon" <will@kernel.org>,
"Waiman Long" <longman@redhat.com>, "Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <benno.lossin@proton.me>,
rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
"Andreas Hindborg" <a.hindborg@kernel.org>
Subject: Re: [PATCH v6] rust: add global lock support
Date: Tue, 29 Oct 2024 15:17:36 +0100 [thread overview]
Message-ID: <CAH5fLgg6xO71ud3mHvEaKhU1tYKf7RKTrVcL1brHoORf9nSgoQ@mail.gmail.com> (raw)
In-Reply-To: <Zx_OoCRrA_WTay_O@Boquns-Mac-mini.local>
On Mon, Oct 28, 2024 at 6:49 PM Boqun Feng <boqun.feng@gmail.com> wrote:
>
> On Wed, Oct 23, 2024 at 01:23:18PM +0000, Alice Ryhl wrote:
> > Add support for creating global variables that are wrapped in a mutex or
> > spinlock.
> >
> > The implementation here is intended to replace the global mutex
> > workaround found in the Rust Binder RFC [1]. In both cases, the global
> > lock must be initialized before first use. The macro is unsafe to use
> > for the same reason.
> >
> > The separate initialization step is required because it is tricky to
> > access the value of __ARCH_SPIN_LOCK_UNLOCKED from Rust. Doing so will
> > require changes to the C side. That change will happen as a follow-up to
> > this patch.
> >
> > Link: https://lore.kernel.org/rust-for-linux/20231101-rust-binder-v1-2-08ba9197f637@google.com/#Z31drivers:android:context.rs [1]
> > Signed-off-by: Alice Ryhl <aliceryhl@google.com>
>
> Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
Thanks!
Alice
next prev parent reply other threads:[~2024-10-29 14:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-23 13:23 [PATCH v6] rust: add global lock support Alice Ryhl
2024-10-28 17:49 ` Boqun Feng
2024-10-29 14:17 ` Alice Ryhl [this message]
2024-10-29 18:48 ` Miguel Ojeda
2024-10-29 21:12 ` Boqun Feng
2024-10-30 21:07 ` Miguel Ojeda
2024-11-11 0:14 ` Miguel Ojeda
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=CAH5fLgg6xO71ud3mHvEaKhU1tYKf7RKTrVcL1brHoORf9nSgoQ@mail.gmail.com \
--to=aliceryhl@google.com \
--cc=a.hindborg@kernel.org \
--cc=benno.lossin@proton.me \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=gary@garyguo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mingo@redhat.com \
--cc=ojeda@kernel.org \
--cc=peterz@infradead.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=will@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 NNTP newsgroup(s).