Add helper to run a function as a routine kmsg
[akaros.git] / kern / include / syscall.h
index cdff324..304b4e8 100644 (file)
@@ -4,6 +4,7 @@
 #endif
 
 #include <ros/common.h>
+#include <ros/syscall.h>
 #include <process.h>
 #include <kref.h>
 #include <ns.h>
@@ -20,7 +21,6 @@
 #define MAX_ASRC_BATCH                         10
 
 #define SYSTR_RECORD_SZ                                256
-#define SYSTR_BUF_SZ                           PGSIZE
 #define SYSTR_PRETTY_BUF_SZ                    (SYSTR_BUF_SZ -                            \
                                      sizeof(struct systrace_record))
 struct systrace_record {
@@ -39,6 +39,7 @@ struct systrace_record {
                uint32_t                vcoreid;
                char                    *pretty_buf;
                uint8_t                 datalen;
+               int                             errno;
        };
        uint8_t                 data[SYSTR_RECORD_SZ - sizeof(struct systrace_record_anon)];
 };
@@ -87,3 +88,4 @@ void __signal_syscall(struct syscall *sysc, struct proc *p);
 /* Utility */
 bool syscall_uses_fd(struct syscall *sysc, int fd);
 void print_sysc(struct proc *p, struct syscall *sysc);
+void kth_panic_sysc(struct kthread *kth);