[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_4237DDAC9DC29A9774F0F24D438C0ED31C05@qq.com>
Date: Sat, 7 Dec 2024 22:35:54 +0800
From: Guangbo Cui <2407018371@...com>
To: a.hindborg@...nel.org
Cc: alex.gaynor@...il.com,
aliceryhl@...gle.com,
anna-maria@...utronix.de,
benno.lossin@...ton.me,
bjorn3_gh@...tonmail.com,
boqun.feng@...il.com,
dakr@...nel.org,
frederic@...nel.org,
gary@...yguo.net,
linux-kernel@...r.kernel.org,
lyude@...hat.com,
ojeda@...nel.org,
rust-for-linux@...r.kernel.org,
tglx@...utronix.de,
tmgross@...ch.edu
Subject: Re: [PATCH v4 02/14] rust: hrtimer: introduce hrtimer support
> +#[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
Powered by blists - more mailing lists