syscall: c syntax do be hard tho

This commit is contained in:
anna 2021-02-27 21:24:26 +01:00
parent b7abbf1cf7
commit 5fa7639ce8
Signed by: fef
GPG key ID: EC22E476DC2D3D84
2 changed files with 2 additions and 2 deletions

View file

@ -20,7 +20,7 @@ enum syscall {
int syscall(enum syscall number, ...);
/** The table of system call handlers, indexed by syscall number. */
extern const int (*sys_table[NSYSCALLS])(sysarg_t arg1, sysarg_t arg2, sysarg_t arg3,
extern int (*const sys_table[NSYSCALLS])(sysarg_t arg1, sysarg_t arg2, sysarg_t arg3,
sysarg_t arg4, sysarg_t arg5, sysarg_t arg6);
/* catchall handler that returns -ENOSYS */

View file

@ -9,7 +9,7 @@
[number] (int (*)(sysarg_t, sysarg_t, sysarg_t, sysarg_t, sysarg_t, sysarg_t))(func)
__rodata
const int (*sys_table[NSYSCALLS])(sysarg_t arg1, sysarg_t arg2, sysarg_t arg3,
int (*const sys_table[NSYSCALLS])(sysarg_t arg1, sysarg_t arg2, sysarg_t arg3,
sysarg_t arg4, sysarg_t arg5, sysarg_t arg6) = {
sys_table_entry(SYSCALL_READ, &sys_read),
sys_table_entry(SYSCALL_WRITE, &sys_write),