Commit 18eb7608 authored by Philippe Gerum's avatar Philippe Gerum
Browse files

cobalt/kernel: fixup for v3.19+ (trace_seq)

parent 4d5108b4
......@@ -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
......
......@@ -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", \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment