[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87r04ejamw.fsf@kernel.org>
Date: Tue, 04 Feb 2025 10:56:55 +0100
From: Andreas Hindborg <a.hindborg@...nel.org>
To: "Tamir Duberstein" <tamird@...il.com>
Cc: "Miguel Ojeda" <ojeda@...nel.org>, "Anna-Maria Behnsen"
<anna-maria@...utronix.de>, "Frederic Weisbecker" <frederic@...nel.org>,
"Thomas Gleixner" <tglx@...utronix.de>, "Danilo Krummrich"
<dakr@...nel.org>, "Alex Gaynor" <alex.gaynor@...il.com>, "Boqun Feng"
<boqun.feng@...il.com>, "Gary Guo" <gary@...yguo.net>, Björn Roy Baron
<bjorn3_gh@...tonmail.com>, "Benno Lossin" <benno.lossin@...ton.me>,
"Alice Ryhl" <aliceryhl@...gle.com>, "Trevor Gross" <tmgross@...ch.edu>,
"Lyude Paul" <lyude@...hat.com>, "Guangbo Cui" <2407018371@...com>,
"Dirk Behme" <dirk.behme@...il.com>, "Daniel Almeida"
<daniel.almeida@...labora.com>, <rust-for-linux@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v6 03/14] rust: sync: add `Arc::as_ptr`
"Tamir Duberstein" <tamird@...il.com> writes:
> On Thu, Jan 16, 2025 at 2:23 PM Andreas Hindborg <a.hindborg@...nel.org> wrote:
>>
>> "Tamir Duberstein" <tamird@...il.com> writes:
>>
>> > On Fri, Jan 10, 2025 at 3:19 PM Andreas Hindborg <a.hindborg@...nel.org> wrote:
>> >>
>> >> Add a method to get a pointer to the data contained in an `Arc`.
>> >>
>> >> Signed-off-by: Andreas Hindborg <a.hindborg@...nel.org>
>> >
>> > Can this mention why it is needed?
>>
>> I can add that after the cut. It is for impleminting `HrTimerPointer`
>> for `Arc`.
>
> The broader question is: why do we need to implement `/HrTimerPointer
> ` for `Arc`? Even broader is: why do we need to use raw pointers so
> much?
The C APIs work with raw pointers. One important detail here is that the
consumers of the Rust APIs will never work with raw pointers. That is
all encapsulated within the abstractions.
Best regards,
Andreas Hindborg
Powered by blists - more mailing lists