lkml.org 
[lkml]   [2020]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 11/27] rcu,tracing: Create trace_rcu_{enter,exit}()
On Fri, Mar 06, 2020 at 12:50:42PM +0100, Peter Zijlstra wrote:
> > +static inline int trace_rcu_enter(void)
> > +{
> > + int state = !rcu_is_watching();
> > + if (state)
> > + rcu_irq_enter_irqsave();
> > + return state;
> > +}
> > +
> > +static inline void trace_rcu_exit(int state)
> > +{
> > + if (state)
> > + rcu_irq_exit_irqsave();
> > +}
> > +
> > /*
> > * The init_rcu_head_on_stack() and destroy_rcu_head_on_stack() calls
> > * are needed for dynamic initialization and destruction of rcu_head

Also, I just noticed these read like tracepoints, so I'm going to rename
them: rcu_trace_{enter,exit}().

\
 
 \ /
  Last update: 2020-03-06 13:41    [W:0.085 / U:9.564 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site