From: Guangbo Cui <2407018371@qq.com>
To: a.hindborg@kernel.org
Cc: alex.gaynor@gmail.com, aliceryhl@google.com,
anna-maria@linutronix.de, benno.lossin@proton.me,
bjorn3_gh@protonmail.com, boqun.feng@gmail.com, dakr@kernel.org,
frederic@kernel.org, gary@garyguo.net,
linux-kernel@vger.kernel.org, lyude@redhat.com, ojeda@kernel.org,
rust-for-linux@vger.kernel.org, tglx@linutronix.de,
tmgross@umich.edu
Subject: Re: [PATCH v4 02/14] rust: hrtimer: introduce hrtimer support
Date: Sat, 7 Dec 2024 22:35:54 +0800 [thread overview]
Message-ID: <tencent_4237DDAC9DC29A9774F0F24D438C0ED31C05@qq.com> (raw)
In-Reply-To: <20241206-hrtimer-v3-v6-12-rc2-v4-2-6cb8c3673682@kernel.org>
> +#[macro_export]
> +macro_rules! impl_has_timer {
> + (
> + impl$({$($generics:tt)*})?
> + HasTimer<$timer_type:ty>
> + for $self:ty
> + { self.$field:ident }
> + $($rest:tt)*
> + ) => {
> + // SAFETY: This implementation of `raw_get_timer` only compiles if the
> + // field has the right type.
> + unsafe impl$(<$($generics)*>)? $crate::time::hrtimer::HasTimer<$timer_type> for $self {
> + const OFFSET: usize = ::core::mem::offset_of!(Self, $field) as usize;
> +
> + #[inline]
> + unsafe fn raw_get_timer(ptr: *const Self) ->
> + *const $crate::::time::hrtimer::Timer<$timer_type>
Hi Andreas, an extra `::` here.
Best regards,
Guangbo Cui
next prev parent reply other threads:[~2024-12-07 14:41 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-06 19:32 [PATCH v4 00/14] hrtimer Rust API Andreas Hindborg
2024-12-06 19:32 ` [PATCH v4 01/14] rust: time: Add Ktime::from_ns() Andreas Hindborg
2024-12-06 19:32 ` [PATCH v4 02/14] rust: hrtimer: introduce hrtimer support Andreas Hindborg
2024-12-07 14:35 ` Guangbo Cui [this message]
2024-12-07 17:36 ` Andreas Hindborg
2024-12-06 19:32 ` [PATCH v4 03/14] rust: sync: add `Arc::as_ptr` Andreas Hindborg
2024-12-06 19:32 ` [PATCH v4 04/14] rust: hrtimer: implement `TimerPointer` for `Arc` Andreas Hindborg
2024-12-06 19:32 ` [PATCH v4 05/14] rust: hrtimer: allow timer restart from timer handler Andreas Hindborg
2024-12-06 19:32 ` [PATCH v4 06/14] rust: hrtimer: add `UnsafeTimerPointer` Andreas Hindborg
2024-12-06 19:32 ` [PATCH v4 07/14] rust: hrtimer: implement `UnsafeTimerPointer` for `Pin<&T>` Andreas Hindborg
2024-12-06 19:33 ` [PATCH v4 08/14] rust: hrtimer: implement `UnsafeTimerPointer` for `Pin<&mut T>` Andreas Hindborg
2024-12-06 19:33 ` [PATCH v4 09/14] rust: hrtimer: add `hrtimer::ScopedTimerPointer` Andreas Hindborg
2024-12-06 19:33 ` [PATCH v4 10/14] rust: alloc: add `Box::into_pin` Andreas Hindborg
2024-12-06 20:17 ` Danilo Krummrich
2024-12-06 21:25 ` Andreas Hindborg
2024-12-09 10:25 ` Danilo Krummrich
2024-12-06 19:33 ` [PATCH v4 11/14] rust: hrtimer: implement `TimerPointer` for `Pin<Box<T>>` Andreas Hindborg
2024-12-06 19:33 ` [PATCH v4 12/14] rust: hrtimer: add `TimerMode` Andreas Hindborg
2024-12-06 19:33 ` [PATCH v4 13/14] rust: hrtimer: add clocksource selection through `ClockSource` Andreas Hindborg
2024-12-06 19:33 ` [PATCH v4 14/14] rust: hrtimer: add maintainer entry 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=tencent_4237DDAC9DC29A9774F0F24D438C0ED31C05@qq.com \
--to=2407018371@qq.com \
--cc=a.hindborg@kernel.org \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=anna-maria@linutronix.de \
--cc=benno.lossin@proton.me \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=dakr@kernel.org \
--cc=frederic@kernel.org \
--cc=gary@garyguo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lyude@redhat.com \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tglx@linutronix.de \
--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