Fix: signal: Remove SEND_SIG_FORCED (v4.20)
[lttng-modules.git] / instrumentation / events / lttng-module / signal.h
index 8783b52769e8bb20addec8f31b33c27a746a292e..ad8fe6960e0de588fb41457f6750c1cddcae7ab6 100644 (file)
 #include <linux/signal.h>
 #include <linux/sched.h>
 #undef LTTNG_FIELDS_SIGINFO
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0))
+#define LTTNG_FIELDS_SIGINFO(info)                             \
+               ctf_integer(int, errno,                         \
+                       (info == SEND_SIG_NOINFO || info == SEND_SIG_PRIV) ? \
+                       0 :                                     \
+                       info->si_errno)                         \
+               ctf_integer(int, code,                          \
+                       (info == SEND_SIG_NOINFO) ?             \
+                       SI_USER :                               \
+                       ((info == SEND_SIG_PRIV) ? SI_KERNEL : info->si_code))
+#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0) */
 #define LTTNG_FIELDS_SIGINFO(info)                             \
                ctf_integer(int, errno,                         \
                        (info == SEND_SIG_NOINFO || info == SEND_SIG_FORCED || info == SEND_SIG_PRIV) ? \
@@ -21,6 +32,7 @@
                        (info == SEND_SIG_NOINFO || info == SEND_SIG_FORCED) ? \
                        SI_USER :                               \
                        ((info == SEND_SIG_PRIV) ? SI_KERNEL : info->si_code))
+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0) */
 #endif /* _TRACE_SIGNAL_DEF */
 
 /**
This page took 0.023573 seconds and 4 git commands to generate.