Re: [RFC PATCH] rcu: Make 'rcu_assign_pointer(p, v)' of type 'typeof(p)'

2019-05-23 Thread Paul E. McKenney
On Thu, May 23, 2019 at 03:19:19PM +0100, Mark Rutland wrote: > On Thu, May 23, 2019 at 06:50:13AM -0700, Paul E. McKenney wrote: > > On Thu, May 23, 2019 at 03:32:20PM +0200, Andrea Parri wrote: > > > The expression > > > > > > rcu_assign_pointer(p, typeof(p) v) > > > > > > is reported to be

Re: [RFC PATCH] rcu: Make 'rcu_assign_pointer(p, v)' of type 'typeof(p)'

2019-05-23 Thread Andrea Parri
> > > TBH, I'm not sure this is 'the right patch' (hence the RFC...): in > > > fact, I'm currently missing the motivations for allowing assignments > > > such as the "r0 = ..." assignment above in generic code. (BTW, it's > > > not currently possible to use such assignments in litmus tests...) >

Re: [RFC PATCH] rcu: Make 'rcu_assign_pointer(p, v)' of type 'typeof(p)'

2019-05-23 Thread Andrea Parri
> > TBH, I'm not sure this is 'the right patch' (hence the RFC...): in > > fact, I'm currently missing the motivations for allowing assignments > > such as the "r0 = ..." assignment above in generic code. (BTW, it's > > not currently possible to use such assignments in litmus tests...) > > Given

Re: [RFC PATCH] rcu: Make 'rcu_assign_pointer(p, v)' of type 'typeof(p)'

2019-05-23 Thread Mark Rutland
On Thu, May 23, 2019 at 06:50:13AM -0700, Paul E. McKenney wrote: > On Thu, May 23, 2019 at 03:32:20PM +0200, Andrea Parri wrote: > > The expression > > > > rcu_assign_pointer(p, typeof(p) v) > > > > is reported to be of type 'typeof(p)' in the documentation (c.f., e.g., > >

Re: [RFC PATCH] rcu: Make 'rcu_assign_pointer(p, v)' of type 'typeof(p)'

2019-05-23 Thread Paul E. McKenney
On Thu, May 23, 2019 at 03:32:20PM +0200, Andrea Parri wrote: > The expression > > rcu_assign_pointer(p, typeof(p) v) > > is reported to be of type 'typeof(p)' in the documentation (c.f., e.g., > Documentation/RCU/whatisRCU.txt) but this is not the case: for example, > the following snippet >

[RFC PATCH] rcu: Make 'rcu_assign_pointer(p, v)' of type 'typeof(p)'

2019-05-23 Thread Andrea Parri
The expression rcu_assign_pointer(p, typeof(p) v) is reported to be of type 'typeof(p)' in the documentation (c.f., e.g., Documentation/RCU/whatisRCU.txt) but this is not the case: for example, the following snippet int **y; int *x; int *r0; ... r0 = rcu_assign_pointer(*y, x);