lkml.org 
[lkml]   [2020]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 08/22] rcu,tracing: Create trace_rcu_{enter,exit}()
On Wed, Feb 19, 2020 at 10:49:03AM -0500, Steven Rostedt wrote:
> On Wed, 19 Feb 2020 15:47:32 +0100
> Peter Zijlstra <peterz@infradead.org> wrote:

> > These helpers are macros because of header-hell; they're placed here
> > because of the proximity to nmi_{enter,exit{().

^^^^

> > +#define trace_rcu_enter() \
> > +({ \
> > + unsigned long state = 0; \
> > + if (!rcu_is_watching()) { \
> > + rcu_irq_enter_irqsave(); \
> > + state = 1; \
> > + } \
> > + state; \
> > +})
> > +
> > +#define trace_rcu_exit(state) \
> > +do { \
> > + if (state) \
> > + rcu_irq_exit_irqsave(); \
> > +} while (0)
> > +
>
> Is there a reason that these can't be static __always_inline functions?

It can be done, but then we need fwd declarations of those RCU functions
somewhere outside of rcupdate.h. It's all a bit of a mess.

\
 
 \ /
  Last update: 2020-02-19 16:59    [W:0.077 / U:0.580 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site