Bring back the ARSC functionality that was removed earlier.
[akaros.git] / kern / include / syscall.h
1 #ifndef ROS_KERN_SYSCALL_H
2 #define ROS_KERN_SYSCALL_H
3 #ifndef ROS_KERNEL
4 # error "This is ROS kernel header; user programs should not #include it"
5 #endif
6
7 #include <ros/syscall.h>
8 #include <process.h>
9
10 #define SYSTRACE_ON                                     0x01
11 #define SYSTRACE_LOUD                           0x02
12 #define SYSTRACE_ALLPROC                        0x04
13
14 #define MAX_NUM_TRACED                          10
15 #define MAX_SYSTRACES                           1024
16
17 #define MAX_ASRC_BATCH                          10
18
19 /* Consider cache aligning this */
20 struct systrace_record {
21         uint64_t                timestamp;
22         uintreg_t               syscallno;
23         int                             pid;
24         uint32_t                coreid;
25         uint32_t                vcoreid;
26 };
27
28
29 intreg_t syscall(struct proc *p, uintreg_t num, uintreg_t a1, uintreg_t a2,
30                  uintreg_t a3, uintreg_t a4, uintreg_t a5);
31
32 /* Tracing functions */
33 void systrace_start(bool silent);
34 void systrace_stop(void);
35 int systrace_reg(bool all, struct proc *p);
36 int systrace_dereg(bool all, struct proc *p);
37 void systrace_print(bool all, struct proc *p);
38 void systrace_clear_buffer(void);
39
40 #endif /* !ROS_KERN_SYSCALL_H */