Mercurial > hg > CbC > CbC_xv6
comparison src/syscall.c @ 29:a672d603ccb2
fix
author | mir3636 |
---|---|
date | Fri, 18 Jan 2019 10:04:37 +0900 |
parents | 36bd61f5c847 |
children | 6a7ab1d7001c |
comparison
equal
deleted
inserted
replaced
28:68de775c3a29 | 29:a672d603ccb2 |
---|---|
113 extern int sys_unlink(void); | 113 extern int sys_unlink(void); |
114 extern int sys_wait(void); | 114 extern int sys_wait(void); |
115 extern int sys_write(void); | 115 extern int sys_write(void); |
116 extern int sys_uptime(void); | 116 extern int sys_uptime(void); |
117 | 117 |
118 extern __code cbc_read(__code(*)(int)); | |
119 | |
118 static int (*syscalls[])(void) = { | 120 static int (*syscalls[])(void) = { |
119 [SYS_fork] =sys_fork, | 121 [SYS_fork] =sys_fork, |
120 [SYS_exit] =sys_exit, | 122 [SYS_exit] =sys_exit, |
121 [SYS_wait] =sys_wait, | 123 [SYS_wait] =sys_wait, |
122 [SYS_pipe] =sys_pipe, | 124 [SYS_pipe] =sys_pipe, |
137 [SYS_link] =sys_link, | 139 [SYS_link] =sys_link, |
138 [SYS_mkdir] =sys_mkdir, | 140 [SYS_mkdir] =sys_mkdir, |
139 [SYS_close] =sys_close, | 141 [SYS_close] =sys_close, |
140 }; | 142 }; |
141 | 143 |
142 static __code (*cbccodes[])(void) = { | 144 static __code (*cbccodes[])(__code (*)(int)) = { |
143 [SYS_cbc_read] = cbc_read, | 145 [SYS_cbc_read] = cbc_read, |
144 }; | 146 }; |
145 | 147 |
146 __code cbc_ret(int ret){ | 148 __code cbc_ret(int ret){ |
147 proc->tf->r0 = ret; | 149 proc->tf->r0 = ret; |