Re: [RFC v2 04/13] rust: sync: atomic: Add generic atomics

2024-12-13 Thread Boqun Feng
On Fri, Dec 13, 2024 at 03:32:47PM +0100, Alice Ryhl wrote: > On Thu, Dec 12, 2024 at 6:34 PM Boqun Feng wrote: > > > > On Thu, Dec 12, 2024 at 11:57:07AM +0100, Alice Ryhl wrote: > > [...] > > > > diff --git a/rust/kernel/sync/atomic/generic.rs > > > > b/rust/kernel/sync/atomic/generic.rs > > >

Re: [RFC v2 04/13] rust: sync: atomic: Add generic atomics

2024-12-13 Thread Alice Ryhl
On Thu, Dec 12, 2024 at 6:34 PM Boqun Feng wrote: > > On Thu, Dec 12, 2024 at 11:57:07AM +0100, Alice Ryhl wrote: > [...] > > > diff --git a/rust/kernel/sync/atomic/generic.rs > > > b/rust/kernel/sync/atomic/generic.rs > > > new file mode 100644 > > > index ..204da38e2691 > > > --- /d

Re: [RFC v2 04/13] rust: sync: atomic: Add generic atomics

2024-12-12 Thread Boqun Feng
On Thu, Dec 12, 2024 at 11:57:07AM +0100, Alice Ryhl wrote: [...] > > diff --git a/rust/kernel/sync/atomic/generic.rs > > b/rust/kernel/sync/atomic/generic.rs > > new file mode 100644 > > index ..204da38e2691 > > --- /dev/null > > +++ b/rust/kernel/sync/atomic/generic.rs > > @@ -0,0 +1

Re: [RFC v2 04/13] rust: sync: atomic: Add generic atomics

2024-12-12 Thread Alice Ryhl
On Fri, Nov 1, 2024 at 7:03 AM Boqun Feng wrote: > > To provide using LKMM atomics for Rust code, a generic `Atomic` is > added, currently `T` needs to be Send + Copy because these are the > straightforward usages and all basic types support this. The trait > `AllowAtomic` should be only ipmlement