summaryrefslogtreecommitdiff
path: root/src/kernel/syscalls.c
AgeCommit message (Collapse)Author
2021-08-25implement FDOP_MOUNTdzwdz
2021-08-25use a tagged union for the fdop argsdzwdz
2021-08-25change the signature of _syscall_fd_mountdzwdz
2021-08-24switch to using user_ptr for pointers coming from userlanddzwdz
this avoid accidental dereferences, and now it's easy to tell apart which pointers are safe to directly read and which aren't. cons: - const is completely discarded
2021-08-24replace () with (void) in function definitionsdzwdz
`()` means that any amt of arguments will be accepted, which isn't what i want
2021-08-24move syscalls.h to shared/syscalls.hdzwdz
2021-08-24remove _syscall_debug_log, as it's not needed anymoredzwdz
2021-08-24fdop_dispatch: pass the fd struct instead of indexdzwdz
2021-08-24add some scaffolding for file descriptorsdzwdz
2021-08-22virt_iter: count bytes that were already iterated overdzwdz
2021-08-22fs_open() accepts a signed length, fixes an infinite loopdzwdz
it occureed if the path_simplify returned a negative value - instead of being interpreter as an error it just carried on, ending up in an infinite loop.
2021-08-22basic mount resolvingdzwdz
2021-08-22fs_open() stubdzwdz
2021-08-22process_switch_any: deduplicate some codedzwdz
2021-08-22fix almost all compiler warningsdzwdz
2021-08-22fix typo in _syscall_await definitiondzwdz
2021-08-22kernel: implement assertdzwdz
2021-08-22await() 2: pass the exit messagedzwdz
2021-08-18await() 1: wait for child to die, without message passingdzwdz
The length is a int, because the syscall will have a signed output. A negative return value will mean an error (such as when it gets called by a childless process).
2021-08-18fork() now has a return value; you can tell the child and parent apartdzwdz
2021-08-18rename process_clone to process_forkdzwdz
2021-08-11abstract out iterating over virtual memorydzwdz
most syscalls will have to do this to copy memory around or whatever. it's pretty ugly too, but i can't come up with a better abstraction...
2021-08-11read _syscall_debuglog arguments across page boundariesdzwdz
2021-08-09rename `log_` to `tty_`, `tty_` to `vga_`dzwdz
2021-07-31change the syscall naming convention; same one in kernel and userlanddzwdz
2021-07-26exit() now switches to the first running processdzwdz
i used a linked list because it's the simplest way to implement this
2021-07-26fork() pt 1: cloning process memorydzwdz
2021-07-26mark sc_exit() as noreturndzwdz
gets rid of the double panic() call
2021-07-24save all registers on syscallsdzwdz
2021-07-23add a barebones exit() syscalldzwdz
2021-07-23update the process' EIP/ESP when it syscallsdzwdz
2021-07-22implement the debuglog() syscalldzwdz
2021-07-21syscall parameter & return value passingdzwdz
Sadly, sysenter on i386 limits me to only 4 arguments (so, 1 for the syscall id + 3 real args). If that turns out to be an issue I'll either just switch to interrupts, or switch to x64.
2021-07-21barebones syscalldzwdz