[RFC 2/2] rust: sync: Add atomic support

Miguel Ojeda miguel.ojeda.sandonis at gmail.com
Thu Jun 13 10:22:54 PDT 2024


On Thu, Jun 13, 2024 at 6:31 PM Boqun Feng <boqun.feng at gmail.com> wrote:
>
> So let's start with some basic and simple until we really have a need
> for generic `Atomic<T>`. Thoughts?

I don't want to delay this, but using generics would be more flexible,
right? e.g. it could allow us to have atomics of, say, newtypes, if
that were to be useful.

Is there a particular disadvantage of using the generics? The two
cases you mentioned would just be written explicitly, right?

One disadvantage would be that they are different from the Rust
standard library ones, e.g. in case we wanted third-party code to use
them, but could be provided if needed later on.

Cheers,
Miguel



More information about the linux-arm-kernel mailing list