Skip to contentSkip to conversation

lttng-module: sched.h: Fix compilation on 3.9 kernel

PATCH Mathieu Desnoyers 1 participant 1 message Mar 22, 2013 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Mathieu Desnoyers

author Applied
#1 lore raw
Quoted 5 lines · * [email protected] ([email protected]) wrote:

From: "Maxin B. John" <[email protected]>

With commit 8bd75c77b7c6a3954140dd2e20346aef3efe4a35 included in 3.9-rc1 kernel, rt specific bits in "linux/sched.h" were moved into new header file "linux/sched/rt.h".

merged into both master and stable-2.1 branches, thanks!

Mathieu

Quoted 34 lines

Fixes this compilation error:
CC [M] /home/majo/lttng/lttng-modules/probes/lttng-probe-sched.o
...
/home/majo/lttng/lttng-modules/probes/../instrumentation/events/lttng-module /../../../probes/../instrumentation/events/lttng-module/sched.h:
In function '__event_probe__sched_switch':
/home/majo/lttng/lttng-modules/probes/../instrumentation/events/lttng-module /../../../probes/../instrumentation/events/lttng-module/sched.h:164:1:
error: 'MAX_RT_PRIO' undeclared (first use in this function)
...

---
 instrumentation/events/lttng-module/sched.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
instrumentation/events/lttng-module/sched.h +3 -0
index e42acd2..25faad0 100644
@@ -8,6 +8,9 @@
 #include <linux/tracepoint.h>
 #include <linux/binfmts.h>
 #include <linux/version.h>
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0))
+#include <linux/sched/rt.h>
+#endif
 
 #ifndef _TRACE_SCHED_DEF_
 #define _TRACE_SCHED_DEF_
Signature · 1 line
1.7.5.4
Signature · 3 lines
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com