Module: xenomai-jki
Branch: queues/ftrace
Commit: d1dc994aa721d5f191f6773425685ca203c3f5b1
URL:    
http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=d1dc994aa721d5f191f6773425685ca203c3f5b1

Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Wed Jan  9 14:50:37 2013 +0100

Provide wrappings for TRACE_EVENT & Co. on older kernels

They will do nothing except proving empty static inlines for the trace
points defined in the code.

Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>

---

 include/asm-generic/wrappers.h      |   13 +++++++++++++
 include/compat/linux/tracepoint.h   |    1 +
 include/compat/trace/define_trace.h |    1 +
 3 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/include/asm-generic/wrappers.h b/include/asm-generic/wrappers.h
index 9a7ce1a..fbe91d7 100644
--- a/include/asm-generic/wrappers.h
+++ b/include/asm-generic/wrappers.h
@@ -799,4 +799,17 @@ proc_create(const char *name, mode_t mode, struct 
proc_dir_entry *parent,
 #endif /* < 2.6.25 */
 #endif /* < 3.10 */
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
+#define DECLARE_EVENT_CLASS(name, proto, args, struct, assign, print)
+#define DEFINE_EVENT(class, name, proto, args) \
+       static inline void trace_##name(proto) { }
+#define TRACE_EVENT(name, proto, args, struct, assign, print) \
+       static inline void trace_##name(proto) { }
+#define TP_PROTO(args...)
+#define TP_ARGS(args...)
+#define TP_STRUCT__entry(args...)
+#define TP_fast_assign(args...)
+#define TP_printk(fmt, args...)
+#endif /* < 2.6.30 */
+
 #endif /* _XENO_ASM_GENERIC_WRAPPERS_H */
diff --git a/include/compat/linux/tracepoint.h 
b/include/compat/linux/tracepoint.h
new file mode 100644
index 0000000..40a8c17
--- /dev/null
+++ b/include/compat/linux/tracepoint.h
@@ -0,0 +1 @@
+/* empty */
diff --git a/include/compat/trace/define_trace.h 
b/include/compat/trace/define_trace.h
new file mode 100644
index 0000000..40a8c17
--- /dev/null
+++ b/include/compat/trace/define_trace.h
@@ -0,0 +1 @@
+/* empty */


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to