X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=liblttng-ust%2Flttng-context-net-ns.c;fp=liblttng-ust%2Flttng-context-net-ns.c;h=c1ae97967ab5679d3b68c1328b40f0dcb9b4d4fc;hb=a251a2090be0b47988cd78a448ea818293244ca1;hp=3da46d636f107334c0f0e44955d2ff8d5eb4ba9c;hpb=5ffb7c14f2a7e58ff18864c0d14909bdf23bc65d;p=lttng-ust.git diff --git a/liblttng-ust/lttng-context-net-ns.c b/liblttng-ust/lttng-context-net-ns.c index 3da46d63..c1ae9796 100644 --- a/liblttng-ust/lttng-context-net-ns.c +++ b/liblttng-ust/lttng-context-net-ns.c @@ -34,12 +34,15 @@ #include "lttng-tracer-core.h" #include "ns.h" - /* * We cache the result to ensure we don't stat(2) the proc filesystem on * each event. */ +#ifdef CONFIG_RCU_TLS static DEFINE_URCU_TLS(ino_t, cached_net_ns) = NS_INO_UNINITIALIZED; +#else +static DEFINE_URCU_TLS_INIT(ino_t, cached_net_ns, NS_INO_UNINITIALIZED); +#endif static ino_t get_net_ns(void)