[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wj37zT4Fy+mBFVRKPy=NMKcB6xBzqOuFrW0jOTv8LKozg@mail.gmail.com>
Date: Thu, 27 Feb 2025 11:15:54 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Ralf Jung <post@...fj.de>
Cc: Kent Overstreet <kent.overstreet@...ux.dev>, Martin Uecker <uecker@...raz.at>,
"Paul E. McKenney" <paulmck@...nel.org>, Alice Ryhl <aliceryhl@...gle.com>,
Ventura Jack <venturajack85@...il.com>, Gary Guo <gary@...yguo.net>, airlied@...il.com,
boqun.feng@...il.com, david.laight.linux@...il.com, ej@...i.de,
gregkh@...uxfoundation.org, hch@...radead.org, hpa@...or.com,
ksummit@...ts.linux.dev, linux-kernel@...r.kernel.org,
miguel.ojeda.sandonis@...il.com, rust-for-linux@...r.kernel.org
Subject: Re: C aggregate passing (Rust kernel policy)
On Thu, 27 Feb 2025 at 10:33, Ralf Jung <post@...fj.de> wrote:
>
> The way you do global flags in Rust is like this:
Note that I was really talking mainly about the unsafe cases, an din
particular when interfacing with C code.
Also, honestly:
> FLAG.store(true, Ordering::SeqCst); // or release/acquire/relaxed
I suspect in reality it would be hidden as accessor functions, or
people just continue to write things in C.
Yes, I know all about the C++ memory ordering. It's not only a
standards mess, it's all very illegible code too.
Linus
Powered by blists - more mailing lists