lkml.org 
[lkml]   [2017]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 tip/core/rcu 05/40] rcu: Semicolon inside RCU_TRACE() for rcu.h
On Wed, Apr 19, 2017 at 10:41:23AM -0700, Joe Perches wrote:
> On Wed, 2017-04-19 at 09:58 -0700, Paul E. McKenney wrote:
> > The current use of "RCU_TRACE(statement);" can cause odd bugs, especially
> > where "statement" is a local-variable declaration, as it can leave a
> > misplaced ";" in the source code. This commit therefore converts these
> > to "RCU_TRACE(statement;)", which avoids the misplaced ";".
>
> Perhaps instead the single RCU_TRACE macro should be split
> into RCU_TRACE_DECLARE and RCU_TRACE, and then RCU_TRACE
> should use do {} while (0)

Cute trick, but I am having a hard time getting very excited either way.
Thoughts from others?

Thanx, Paul

\
 
 \ /
  Last update: 2017-04-25 23:01    [W:0.133 / U:2.764 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site