[ltt-dev] urcu library name-spacing

Paul E. McKenney paulmck at linux.vnet.ibm.com
Sun Nov 14 12:02:52 EST 2010


On Sun, Nov 14, 2010 at 11:29:37AM -0500, Mathieu Desnoyers wrote:
> Hi Paul,
> 
> We're currently deploying UST (and thus urcu) into MariaDB (it's also deployed
> in qemu), and it looks like there are some of our primitives that are causing
> namespacing clash, e.g.
> 
> list_add
> list_del
> 
> etc.
> 
> So I was wondering how we could proceed to change the namespace to something
> that is not too confusing. Using a "rcu_" prefix is out of question, because it
> would confuse "rcu-related" primitives (e.g. a primitive designed to be used in
> a rcu read-side C.S. or update) with userspace-rcu-related primitives.
> 
> E.g., for list.h, we don't want to name these "rcu_list_add" if they are not
> RCU-aware.
> 
> This would apply to other primitives, e.g.:
> 
> barrier()
> smp_mb()
> ....
> 
> So I would not want to use a prefix that is too long neither.
> 
> So far, for the atomic operations, I've simply done:
> 
> atomic_op() -> uatomic_op() (simply prepending a u). Do you think we could use
> this technique for the rest ? (e.g. ulist_add, usmp_mb, etc)

Makes sense to me!

Of course, at some point, it might make sense to have the list primitives
in a separate user-level library.

							Thanx, Paul




More information about the lttng-dev mailing list