X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=liblttng-ust%2Flttng-context-net-ns.c;h=c0aaa9d4a7d57ccdbe4c626d890f5b1c4a9c583f;hb=fd46f5c79a6a7178e35ce4f8ea21caa30da45cc4;hp=9d6ded12965d5213b6995cbff5705258e6a534d9;hpb=735bef4705cc42f25d26f25be09ba98f1efb8511;p=lttng-ust.git diff --git a/liblttng-ust/lttng-context-net-ns.c b/liblttng-ust/lttng-context-net-ns.c index 9d6ded12..c0aaa9d4 100644 --- a/liblttng-ust/lttng-context-net-ns.c +++ b/liblttng-ust/lttng-context-net-ns.c @@ -33,12 +33,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)