1 #ifndef ROS_KERN_SYSCALL_H
2 #define ROS_KERN_SYSCALL_H
4 # error "This is ROS kernel header; user programs should not #include it"
7 #include <ros/common.h>
10 #define SYSTRACE_ON 0x01
11 #define SYSTRACE_LOUD 0x02
12 #define SYSTRACE_ALLPROC 0x04
14 #define MAX_NUM_TRACED 10
15 #define MAX_SYSTRACES 1024
17 #define MAX_ASRC_BATCH 10
19 /* Consider cache aligning this */
20 struct systrace_record {
35 typedef intreg_t (*syscall_t)(struct proc *, uintreg_t, uintreg_t, uintreg_t,
36 uintreg_t, uintreg_t, uintreg_t);
37 struct sys_table_entry {
41 const static struct sys_table_entry syscall_table[];
42 /* Syscall invocation */
43 void prep_syscalls(struct proc *p, struct syscall *sysc, unsigned int nr_calls);
44 void run_local_syscall(struct syscall *sysc);
45 intreg_t syscall(struct proc *p, uintreg_t sc_num, uintreg_t a0, uintreg_t a1,
46 uintreg_t a2, uintreg_t a3, uintreg_t a4, uintreg_t a5);
47 void set_errno(int errno);
48 void __signal_syscall(struct syscall *sysc, struct proc *p);
50 /* Tracing functions */
51 void systrace_start(bool silent);
52 void systrace_stop(void);
53 int systrace_reg(bool all, struct proc *p);
54 int systrace_dereg(bool all, struct proc *p);
55 void systrace_print(bool all, struct proc *p);
56 void systrace_clear_buffer(void);
58 #endif /* !ROS_KERN_SYSCALL_H */