X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=liblttng-ust%2Flttng-context-cgroup-ns.c;h=cd9e2bc1f1de694ae3e04c3dae470d44fa1b896f;hb=a251a2090be0b47988cd78a448ea818293244ca1;hp=d4053150c5432bcec4ca3a4f4bd9e7142e2185bb;hpb=735bef4705cc42f25d26f25be09ba98f1efb8511;p=lttng-ust.git diff --git a/liblttng-ust/lttng-context-cgroup-ns.c b/liblttng-ust/lttng-context-cgroup-ns.c index d4053150..cd9e2bc1 100644 --- a/liblttng-ust/lttng-context-cgroup-ns.c +++ b/liblttng-ust/lttng-context-cgroup-ns.c @@ -22,6 +22,7 @@ */ #define _LGPL_SOURCE +#include #include #include #include @@ -38,7 +39,11 @@ * 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_cgroup_ns) = NS_INO_UNINITIALIZED; +#else +static DEFINE_URCU_TLS_INIT(ino_t, cached_cgroup_ns, NS_INO_UNINITIALIZED); +#endif static ino_t get_cgroup_ns(void)