Rev 1702 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1702 | Rev 1780 | ||
---|---|---|---|
Line 56... | Line 56... | ||
56 | /** Print using kernel facility |
56 | /** Print using kernel facility |
57 | * |
57 | * |
58 | * Some simulators can print only through kernel. Userspace can use |
58 | * Some simulators can print only through kernel. Userspace can use |
59 | * this syscall to facilitate it. |
59 | * this syscall to facilitate it. |
60 | */ |
60 | */ |
61 | static __native sys_io(int fd, const void * buf, size_t count) |
61 | static unative_t sys_io(int fd, const void * buf, size_t count) |
62 | { |
62 | { |
63 | size_t i; |
63 | size_t i; |
64 | char *data; |
64 | char *data; |
65 | int rc; |
65 | int rc; |
66 | 66 | ||
Line 83... | Line 83... | ||
83 | 83 | ||
84 | return count; |
84 | return count; |
85 | } |
85 | } |
86 | 86 | ||
87 | /** Tell kernel to get keyboard/console access again */ |
87 | /** Tell kernel to get keyboard/console access again */ |
88 | static __native sys_debug_enable_console(void) |
88 | static unative_t sys_debug_enable_console(void) |
89 | { |
89 | { |
90 | arch_grab_console(); |
90 | arch_grab_console(); |
91 | return 0; |
91 | return 0; |
92 | } |
92 | } |
93 | 93 | ||
94 | /** Dispatch system call */ |
94 | /** Dispatch system call */ |
95 | __native syscall_handler(__native a1, __native a2, __native a3, |
95 | unative_t syscall_handler(unative_t a1, unative_t a2, unative_t a3, |
96 | __native a4, __native id) |
96 | unative_t a4, unative_t id) |
97 | { |
97 | { |
98 | __native rc; |
98 | unative_t rc; |
99 | 99 | ||
100 | if (id < SYSCALL_END) |
100 | if (id < SYSCALL_END) |
101 | rc = syscall_table[id](a1,a2,a3,a4); |
101 | rc = syscall_table[id](a1,a2,a3,a4); |
102 | else { |
102 | else { |
103 | klog_printf("TASK %lld: Unknown syscall id %d",TASK->taskid,id); |
103 | klog_printf("TASK %lld: Unknown syscall id %d",TASK->taskid,id); |