From: Gary Guo <gary@garyguo.net>
To: Alice Ryhl <aliceryhl@google.com>
Cc: "Wedson Almeida Filho" <wedsonaf@gmail.com>,
rust-for-linux@vger.kernel.org, "Miguel Ojeda" <ojeda@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <benno.lossin@proton.me>,
"Andreas Hindborg" <a.hindborg@samsung.com>,
linux-kernel@vger.kernel.org,
"Wedson Almeida Filho" <walmeida@microsoft.com>
Subject: Re: [PATCH 2/2] rust: arc: remove `ArcBorrow` in favour of `WithRef`
Date: Sat, 23 Sep 2023 08:16:04 +0800 [thread overview]
Message-ID: <20230923081604.6e2de521@gary-lowrisc-laptop> (raw)
In-Reply-To: <CAH5fLgj_wQtmW4A6-4wPeP-Qmk2ga2NoVRwZDujjYvHWY7Bk3A@mail.gmail.com>
On Fri, 22 Sep 2023 17:29:58 +0200
Alice Ryhl <aliceryhl@google.com> wrote:
> On Thu, Sep 21, 2023 at 11:35 PM Wedson Almeida Filho
> <wedsonaf@gmail.com> wrote:
> >
> > From: Wedson Almeida Filho <walmeida@microsoft.com>
> >
> > With GATs, we don't need a separate type to represent a borrowed object
> > with a refcount, we can just use Rust's regular shared borrowing. In
> > this case, we use `&WithRef<T>` instead of `ArcBorrow<'_, T>`.
> >
> > Co-developed-by: Boqun Feng <boqun.feng@gmail.com>
> > Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
> > Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com>
>
> I wonder whether "WithArc" is a better name? After all, arc is short
> for "atomic refcount".
> I also think it's nice to include Arc in the name of the type.
>
> Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Or just call it with `WithRc` -- we don't use `aloc::rc::Rc` in the
kernel so there's no need to emphasis that this one is atomic :)
I personally think the `WithRef` name is fine, we have a smart pointer
called `ARef` after all :)
Best,
Gary
next prev parent reply other threads:[~2023-09-23 0:16 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-21 21:34 [PATCH 0/2] Remove `ArcBorrow` Wedson Almeida Filho
2023-09-21 21:34 ` [PATCH 1/2] rust: arc: rename `ArcInner` to `WithRef` Wedson Almeida Filho
2023-09-21 21:47 ` Finn Behrens
2023-09-22 7:50 ` Benno Lossin
2023-09-22 15:26 ` Alice Ryhl
2023-09-22 22:52 ` Martin Rodriguez Reboredo
2023-09-23 0:06 ` Gary Guo
2023-09-21 21:34 ` [PATCH 2/2] rust: arc: remove `ArcBorrow` in favour of `WithRef` Wedson Almeida Filho
2023-09-22 8:53 ` Benno Lossin
2023-09-23 14:01 ` Wedson Almeida Filho
2023-09-22 15:29 ` Alice Ryhl
2023-09-22 19:50 ` Benno Lossin
2023-09-23 14:07 ` Wedson Almeida Filho
2023-09-22 22:55 ` Martin Rodriguez Reboredo
2023-09-23 0:16 ` Gary Guo [this message]
2023-09-22 22:53 ` Martin Rodriguez Reboredo
2023-09-23 0:12 ` Gary Guo
2023-09-23 14:11 ` Wedson Almeida Filho
2023-09-23 14:15 ` Alice Ryhl
2023-09-23 14:20 ` Wedson Almeida Filho
2023-09-23 5:16 ` Jianguo Bao
2023-09-23 14:12 ` Wedson Almeida Filho
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=20230923081604.6e2de521@gary-lowrisc-laptop \
--to=gary@garyguo.net \
--cc=a.hindborg@samsung.com \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=benno.lossin@proton.me \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=walmeida@microsoft.com \
--cc=wedsonaf@gmail.com \
/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