X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=instrumentation%2Fevents%2Flttng-module%2Fsignal.h;h=ad8fe6960e0de588fb41457f6750c1cddcae7ab6;hb=89f0be35e1baf411df6852014013ac64ad1bbcf8;hp=8783b52769e8bb20addec8f31b33c27a746a292e;hpb=0a0d736ec89dffdbc83e7181166a99d5563acfe8;p=lttng-modules.git diff --git a/instrumentation/events/lttng-module/signal.h b/instrumentation/events/lttng-module/signal.h index 8783b527..ad8fe696 100644 --- a/instrumentation/events/lttng-module/signal.h +++ b/instrumentation/events/lttng-module/signal.h @@ -12,6 +12,17 @@ #include #include #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 */ /**