Re: [PATCH 2/5] rust: sync: add const constructor for raw_spinlock_t

From: Alice Ryhl

Date: Tue Jul 07 2026 - 09:24:06 EST


On Mon, Jun 29, 2026 at 08:44:58PM -0700, Boqun Feng wrote:
> On Tue, Jun 23, 2026 at 03:38:05PM +0000, Alice Ryhl wrote:
> > +/// Helper for creating a raw unlocked `bindings::raw_spinlock_t`.
> > +///
> > +/// For use in statics containing raw spinlocks.
>
> I think
>
> #[doc(alias("__SPIN_LOCK_UNLOCKED", "DEFINE_SPINLOCK"))]
>
> is not a bad idea here?

I'll add that.

> Do you plan to have this go via binder tree? (Sorry you might already
> me the plan, but I couldn't recall). Anyway,
>
> Reviewed-by: Boqun Feng <boqun@xxxxxxxxxx>

Yes, I think that would be the simplest. Thanks!

Alice