Module: xenomai-3 Branch: stable-3.0.x Commit: 18eb7608b109c0159ed7ef0d7696407c91c93459 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=18eb7608b109c0159ed7ef0d7696407c91c93459
Author: Philippe Gerum <[email protected]> Date: Tue Nov 3 13:11:25 2015 +0100 cobalt/kernel: fixup for v3.19+ (trace_seq) --- kernel/cobalt/include/asm-generic/xenomai/wrappers.h | 10 ++++++++++ kernel/cobalt/trace/cobalt-posix.h | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/kernel/cobalt/include/asm-generic/xenomai/wrappers.h b/kernel/cobalt/include/asm-generic/xenomai/wrappers.h index fc73cf5..0c5ce69 100644 --- a/kernel/cobalt/include/asm-generic/xenomai/wrappers.h +++ b/kernel/cobalt/include/asm-generic/xenomai/wrappers.h @@ -116,6 +116,16 @@ devm_hwmon_device_register_with_groups(struct device *dev, const char *name, #error "Xenomai/cobalt requires Linux kernel 3.10 or above" #endif /* < 3.10 */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0) +#include <linux/trace_seq.h> + +static inline unsigned char * +trace_seq_buffer_ptr(struct trace_seq *s) +{ + return s->buffer + s->len; +} +#endif + #if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) #define user_msghdr msghdr #endif diff --git a/kernel/cobalt/trace/cobalt-posix.h b/kernel/cobalt/trace/cobalt-posix.h index 536108d..d87582f 100644 --- a/kernel/cobalt/trace/cobalt-posix.h +++ b/kernel/cobalt/trace/cobalt-posix.h @@ -92,7 +92,7 @@ DECLARE_EVENT_CLASS(syscall_exit, #define cobalt_print_sched_params(__policy, __p_ex) \ ({ \ - const char *__ret = p->buffer + p->len; \ + const unsigned char *__ret = trace_seq_buffer_ptr(p); \ switch (__policy) { \ case SCHED_QUOTA: \ trace_seq_printf(p, "priority=%d, group=%d", \ _______________________________________________ Xenomai-git mailing list [email protected] http://xenomai.org/mailman/listinfo/xenomai-git
