public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Hindborg <a.hindborg@kernel.org>
To: "Oliver Mangold" <oliver.mangold@pm.me>
Cc: "Miguel Ojeda" <ojeda@kernel.org>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <benno.lossin@proton.me>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Asahi Lina" <lina@asahilina.net>,
	rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v8 1/4] rust: types: Add Ownable/Owned types
Date: Sun, 23 Mar 2025 21:46:40 +0100	[thread overview]
Message-ID: <87msdb79vz.fsf@kernel.org> (raw)
In-Reply-To: <20250313-unique-ref-v8-1-3082ffc67a31@pm.me> (Oliver Mangold's message of "Thu, 13 Mar 2025 07:00:04 +0000")

"Oliver Mangold" <oliver.mangold@pm.me> writes:

> From: Asahi Lina <lina@asahilina.net>
>
> By analogy to AlwaysRefCounted and ARef, an Ownable type is a (typically
> C FFI) type that *may* be owned by Rust, but need not be. Unlike
> AlwaysRefCounted, this mechanism expects the reference to be unique
> within Rust, and does not allow cloning.
>
> Conceptually, this is similar to a KBox<T>, except that it delegates
> resource management to the T instead of using a generic allocator.
>
> Link: https://lore.kernel.org/all/20250202-rust-page-v1-1-e3170d7fe55e@asahilina.net/
> Signed-off-by: Asahi Lina <lina@asahilina.net>
> [ om: make from_raw() and into_raw() public, small fixes to documentation ]
> Signed-off-by: Oliver Mangold <oliver.mangold@pm.me>

Please see review comments for the original posting of the patch from
Alice [1] and me [2].


Best regards,
Andreas Hindborg


[1] https://lore.kernel.org/all/CAH5fLggscATtCgQwCYSms77oSFOMkjTscRDqAOZsSgoHsOoPQw@mail.gmail.com
[2] https://lore.kernel.org/all/87h64qe3dt.fsf@kernel.org


  parent reply	other threads:[~2025-03-23 20:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <GwULoA3hxsCsNdxJ4lw7WqNC5bhCMacx5xMre9hZV2GWDdYmQx9rYVzHadna4KGiko3Glypv-AeXUsoECQB-EA==@protonmail.internalid>
2025-03-13  6:59 ` [PATCH v8 0/4] New trait OwnableRefCounted for ARef<->Owned conversion Oliver Mangold
2025-03-13  7:00   ` [PATCH v8 1/4] rust: types: Add Ownable/Owned types Oliver Mangold
2025-03-21 16:08     ` Boqun Feng
2025-03-25 12:00       ` Oliver Mangold
2025-03-23 20:46     ` Andreas Hindborg [this message]
2025-03-13  7:00   ` [PATCH v8 2/4] rust: rename AlwaysRefCounted to RefCounted Oliver Mangold
2025-03-21 16:20     ` Boqun Feng
2025-03-24  7:32       ` Oliver Mangold
2025-03-13  7:00   ` [PATCH v8 3/4] rust: kbuild: provide `RUSTC_HAS_DO_NOT_RECOMMEND` symbol Oliver Mangold
2025-03-13  7:00   ` [PATCH v8 4/4] rust: adding OwnableRefCounted and SimpleOwnableRefCounted Oliver Mangold
2025-03-21 16:37     ` Boqun Feng
2025-03-24  7:59       ` Oliver Mangold
2025-03-23 20:19   ` [PATCH v8 0/4] New trait OwnableRefCounted for ARef<->Owned conversion Andreas Hindborg

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=87msdb79vz.fsf@kernel.org \
    --to=a.hindborg@kernel.org \
    --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=gary@garyguo.net \
    --cc=lina@asahilina.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ojeda@kernel.org \
    --cc=oliver.mangold@pm.me \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tmgross@umich.edu \
    /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