Commit 2378a739 authored by Philippe Gerum's avatar Philippe Gerum
Browse files

cobalt/syscall: fix in/out value types

parent 6e0a625e
......@@ -107,10 +107,11 @@ static void prepare_for_signal(struct task_struct *p,
static int handle_head_syscall(struct ipipe_domain *ipd, struct pt_regs *regs)
{
struct cobalt_process *process;
int nr, switched, ret, sigs;
int switched, ret, sigs;
struct xnthread *thread;
cobalt_syshand handler;
struct task_struct *p;
unsigned int nr;
int sysflags;
if (!__xn_syscall_p(regs))
......@@ -121,7 +122,7 @@ static int handle_head_syscall(struct ipipe_domain *ipd, struct pt_regs *regs)
trace_cobalt_head_sysentry(thread, nr);
if (nr < 0 || nr >= __NR_COBALT_SYSCALLS)
if (nr >= __NR_COBALT_SYSCALLS)
goto bad_syscall;
process = cobalt_current_process();
......@@ -285,10 +286,11 @@ bad_syscall:
static int handle_root_syscall(struct ipipe_domain *ipd, struct pt_regs *regs)
{
int nr, sysflags, switched, ret, sigs;
int sysflags, switched, ret, sigs;
struct xnthread *thread;
cobalt_syshand handler;
struct task_struct *p;
unsigned int nr;
/*
* Catch cancellation requests pending for user shadows
......
......@@ -23,13 +23,13 @@
__entry->tv_sec_##__name, __entry->tv_nsec_##__name
DECLARE_EVENT_CLASS(syscall_entry,
TP_PROTO(struct xnthread *thread, int nr),
TP_PROTO(struct xnthread *thread, unsigned int nr),
TP_ARGS(thread, nr),
TP_STRUCT__entry(
__field(struct xnthread *, thread)
__string(name, thread ? thread->name : "(anon)")
__field(int, nr)
__field(unsigned int, nr)
),
TP_fast_assign(
......@@ -38,17 +38,17 @@ DECLARE_EVENT_CLASS(syscall_entry,
__entry->nr = nr;
),
TP_printk("thread=%p(%s) syscall=%d",
TP_printk("thread=%p(%s) syscall=%u",
__entry->thread, __get_str(name), __entry->nr)
);
DECLARE_EVENT_CLASS(syscall_exit,
TP_PROTO(struct xnthread *thread, int result),
TP_PROTO(struct xnthread *thread, long result),
TP_ARGS(thread, result),
TP_STRUCT__entry(
__field(struct xnthread *, thread)
__field(int, result)
__field(long, result)
),
TP_fast_assign(
......@@ -56,7 +56,7 @@ DECLARE_EVENT_CLASS(syscall_exit,
__entry->result = result;
),
TP_printk("thread=%p result=%d",
TP_printk("thread=%p result=%ld",
__entry->thread, __entry->result)
);
......@@ -150,22 +150,22 @@ DECLARE_EVENT_CLASS(cobalt_void,
);
DEFINE_EVENT(syscall_entry, cobalt_head_sysentry,
TP_PROTO(struct xnthread *thread, int nr),
TP_PROTO(struct xnthread *thread, unsigned int nr),
TP_ARGS(thread, nr)
);
DEFINE_EVENT(syscall_exit, cobalt_head_sysexit,
TP_PROTO(struct xnthread *thread, int result),
TP_PROTO(struct xnthread *thread, long result),
TP_ARGS(thread, result)
);
DEFINE_EVENT(syscall_entry, cobalt_root_sysentry,
TP_PROTO(struct xnthread *thread, int nr),
TP_PROTO(struct xnthread *thread, unsigned int nr),
TP_ARGS(thread, nr)
);
DEFINE_EVENT(syscall_exit, cobalt_root_sysexit,
TP_PROTO(struct xnthread *thread, int result),
TP_PROTO(struct xnthread *thread, long result),
TP_ARGS(thread, result)
);
......
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