|
AquilaOS documentation
How it works, and its code
|
#include <core/system.h>Go to the source code of this file.
Typedefs | |
| typedef long(*) | syscall_t(uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t) |
Functions | |
| void | syscall_dispatch (unsigned long nr, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5) |
| Runs a system call that the current thread made from user mode. | |
Variables | |
| const syscall_t | syscall_table [] |
| const size_t | syscall_cnt |
| void syscall_dispatch | ( | unsigned long | nr, |
| uintptr_t | a1, | ||
| uintptr_t | a2, | ||
| uintptr_t | a3, | ||
| uintptr_t | a4, | ||
| uintptr_t | a5 ) |
Runs a system call that the current thread made from user mode.
The architecture's arch_syscall() calls it with the number and the arguments, as they came in registers.
The call's result is set as the thread's result to return to user mode (arch_syscall_return()), except for sigreturn's: its registers are the ones it restored from the signal frame. A call that doesn't return (exit, or an execve that worked) doesn't come back here.
| nr | the system call's number (SYS_*) |
| a1 | its first argument |
| a2 | its second argument |
| a3 | its third argument |
| a4 | its fourth argument |
| a5 | its fifth argument |
Definition at line 313 of file syscall.c.
References arch_syscall_return(), curproc, curthread, printk(), syscall_cnt, syscall_dispatch(), syscall_table, and thread_files_release().
Referenced by arch_syscall(), arch_syscall(), and syscall_dispatch().
|
extern |
Definition at line 293 of file syscall.c.
Referenced by syscall_dispatch().
|
extern |
Definition at line 197 of file syscall.c.
Referenced by syscall_dispatch().