Add namespace contexts
[lttng-modules.git] / lttng-events.h
index 8fe36a7326121f7f7325112c7d77b0105e1eb9ea..fe6e284930153cc681bee9b46e466c3c5b54b4fb 100644 (file)
@@ -718,6 +718,84 @@ int lttng_add_migratable_to_ctx(struct lttng_ctx **ctx)
 
 int lttng_add_callstack_to_ctx(struct lttng_ctx **ctx, int type);
 
+#if defined(CONFIG_CGROUPS) && \
+       ((LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)) || \
+        LTTNG_UBUNTU_KERNEL_RANGE(4,4,0,0, 4,5,0,0))
+int lttng_add_cgroup_ns_to_ctx(struct lttng_ctx **ctx);
+#else
+static inline
+int lttng_add_cgroup_ns_to_ctx(struct lttng_ctx **ctx)
+{
+       return -ENOSYS;
+}
+#endif
+
+#if defined(CONFIG_IPC_NS) && \
+       (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+int lttng_add_ipc_ns_to_ctx(struct lttng_ctx **ctx);
+#else
+static inline
+int lttng_add_ipc_ns_to_ctx(struct lttng_ctx **ctx)
+{
+       return -ENOSYS;
+}
+#endif
+
+#if !defined(LTTNG_MNT_NS_MISSING_HEADER) && \
+       (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+int lttng_add_mnt_ns_to_ctx(struct lttng_ctx **ctx);
+#else
+static inline
+int lttng_add_mnt_ns_to_ctx(struct lttng_ctx **ctx)
+{
+       return -ENOSYS;
+}
+#endif
+
+#if defined(CONFIG_NET_NS) && \
+       (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+int lttng_add_net_ns_to_ctx(struct lttng_ctx **ctx);
+#else
+static inline
+int lttng_add_net_ns_to_ctx(struct lttng_ctx **ctx)
+{
+       return -ENOSYS;
+}
+#endif
+
+#if defined(CONFIG_PID_NS) && \
+       (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+int lttng_add_pid_ns_to_ctx(struct lttng_ctx **ctx);
+#else
+static inline
+int lttng_add_pid_ns_to_ctx(struct lttng_ctx **ctx)
+{
+       return -ENOSYS;
+}
+#endif
+
+#if defined(CONFIG_USER_NS) && \
+       (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+int lttng_add_user_ns_to_ctx(struct lttng_ctx **ctx);
+#else
+static inline
+int lttng_add_user_ns_to_ctx(struct lttng_ctx **ctx)
+{
+       return -ENOSYS;
+}
+#endif
+
+#if defined(CONFIG_UTS_NS) && \
+       (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+int lttng_add_uts_ns_to_ctx(struct lttng_ctx **ctx);
+#else
+static inline
+int lttng_add_uts_ns_to_ctx(struct lttng_ctx **ctx)
+{
+       return -ENOSYS;
+}
+#endif
+
 #if defined(CONFIG_PERF_EVENTS)
 int lttng_add_perf_counter_to_ctx(uint32_t type,
                                  uint64_t config,
This page took 0.023948 seconds and 4 git commands to generate.