lkml.org 
[lkml]   [2012]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH tip/core/rcu 04/17] rcu: Add a gcc-style structure initializer for RCU pointers
Date
Paul E. McKenney <paulmck@linux.vnet.ibm.com> wrote:

> RCU_INIT_POINTER() returns a value that is never used, and which should
> be abolished due to terminal ugliness:
>
> q = RCU_INIT_POINTER(global_p, p);
>
> However, there are two uses that cannot be handled by a do-while
> formulation because they do gcc-style initialization:
>
> RCU_INIT_POINTER(.real_cred, &init_cred),
> RCU_INIT_POINTER(.cred, &init_cred),
>
> This usage is clever, but not necessarily the nicest approach.
> This commit therefore creates an RCU_POINTER_INITIALIZER() macro that
> is specifically designed for gcc-style initialization.
>
> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

Acked-by: David Howells <dhowells@redhat.com>


\
 
 \ /
  Last update: 2012-06-22 18:41    [W:0.137 / U:2.068 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site