|
PatchworkOS
19e446b
A non-POSIX operating system.
|
Go to the source code of this file.
Data Structures | |
| struct | syscall_ctx_t |
| Per thread syscall context. More... | |
| struct | syscall_descriptor_t |
| A syscall descriptor. More... | |
Macros | |
| #define | SYSCALL_CTX_SYSCALL_RSP_OFFSET 0x0 |
The offset of the syscallRsp member in the syscall_ctx_t structure. | |
| #define | SYSCALL_CTX_USER_RSP_OFFSET 0x8 |
The offset of the userRsp member in the syscall_ctx_t structure. | |
| #define | SYSCALL_DEFINE(num, returnType, ...) |
| Macro to define a syscall. | |
Enumerations | |
| enum | syscall_number_t { SYS_EXITS , SYS_THREAD_EXIT , SYS_SPAWN , SYS_NANOSLEEP , SYS_ERRNO , SYS_GETPID , SYS_GETTID , SYS_UPTIME , SYS_EPOCH , SYS_OPEN , SYS_OPEN2 , SYS_CLOSE , SYS_READ , SYS_WRITE , SYS_SEEK , SYS_IOCTL , SYS_POLL , SYS_STAT , SYS_MMAP , SYS_MUNMAP , SYS_MPROTECT , SYS_GETDENTS , SYS_THREAD_CREATE , SYS_YIELD , SYS_DUP , SYS_DUP2 , SYS_FUTEX , SYS_REMOVE , SYS_LINK , SYS_SHARE , SYS_CLAIM , SYS_BIND , SYS_OPENAT , SYS_NOTIFY , SYS_NOTED , SYS_READLINK , SYS_SYMLINK , SYS_MOUNT , SYS_UNMOUNT , SYS_ARCH_PRCTL , SYS_SETUP , SYS_TEARDOWN , SYS_ENTER , SYS_TOTAL_AMOUNT } |
| System Call Numbers. More... | |
| enum | syscall_flags_t { SYSCALL_NORMAL = 0 << 0 , SYSCALL_FORCE_FAKE_INTERRUPT = 1 << 0 } |
| Syscall flags. More... | |
Functions | |
| void | syscall_ctx_init (syscall_ctx_t *ctx, const stack_pointer_t *syscallStack) |
| Initialize a syscall context. | |
| void | syscall_ctx_load (syscall_ctx_t *ctx) |
Load the syscall context into the MSR_KERNEL_GS_BASE MSR. | |
| void | syscall_table_init (void) |
| Sort the syscall table and verify that all syscalls are present. | |
| void | syscall_handler (interrupt_frame_t *frame) |
| Main C syscall handler. | |
| void | syscall_entry (void) |
| Assembly entry point for syscalls. | |
Variables | |
| syscall_descriptor_t | _syscall_table_start [] |
| Linker defined start of the syscall table. | |
| syscall_descriptor_t | _syscall_table_end [] |
| Linker defined end of the syscall table. | |