From: Arnd Bergmann on
On Wednesday 24 February 2010, Mathieu Desnoyers wrote:
> > +/**
> > + * RCU_INIT_POINTER - initialize an RCU protected member
> > + * in a statically allocated data structure.
> > + */
> > +#define RCU_INIT_POINTER(p, v) \
> > + p = (typeof(*v) __force __rcu *)(v)
> Hrm, I'm not sure about this one. It would be better to something closer to
> list.h LIST_HEAD_INIT / LIST_HEAD / INIT_LIST_HEAD. The first two are for
> static declaration/init, while the last one is for runtime init. I fear that
> your RCU_INIT_POINTER might be semantically confusing between static and dynamic
> initialization usual semantic.

I only had to use it in one place, INIT_STRUCT_PID (see patch 08/10), and
the approach of LIST_HEAD does not seem to work there. I'd certainly
prefer to write it in a way that cannot be used for dynamic initialization,
but could not think of one.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)
More majordomo info at
Please read the FAQ at