Prev: [PATCH 3/3] dlm: Send lockspace name with uevents
Next: [PATCH] x86/pci: exclude mrst pci code for other platform
From: Arnd Bergmann on 24 Feb 2010 15:40
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)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/