summaryrefslogtreecommitdiff
path: root/src/kernel/proc.c
AgeCommit message (Collapse)Author
2021-09-12implement part of `fs_respond`dzwdz
2021-09-11replace `user_ptr` with a linux-style `__user` annotationdzwdz
2021-09-08style: simplify the `kmalloc(sizeof(...` callsdzwdz
2021-09-05move most of the memory stuff to kernel/mem/dzwdz
2021-09-04refactor finding empty handles to a functiondzwdz
2021-09-04rename file descriptors to handlesdzwdz
2021-08-25remove FD_STDOUTdzwdz
init can just open `/tty` instead
2021-08-25implement vfs_mount_seed, which creates the vfs passed to initdzwdz
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-24implement FD_SPECIAL_TTY, an stdout equaliventdzwdz
2021-08-24add some scaffolding for file descriptorsdzwdz
2021-08-22basic mount resolvingdzwdz
2021-08-22process_switch_any: deduplicate some codedzwdz
2021-08-22fix almost all compiler warningsdzwdz
2021-08-18processes now store a PID for debugging purposesdzwdz
2021-08-18fork(): store information about the parent toodzwdz
2021-08-18rename process_clone to process_forkdzwdz
2021-08-18store the processes as a tree instead of a listdzwdz
I'm about to need that for waits(). There's no single list of processes for simplicity's sake, but the search will now be even slower and it might even introduce a potential vuln! How fun! Someone could override stuff in .bss with random values. I'll either make gcc check if it hasn't gone past the end of the stack, or turn this into a non recursive function.
2021-07-31kmalloc() and kfree() stubsdzwdz
2021-07-26rename process_new() to process_seed()dzwdz
it's only meant to create the root process, the old name could've been misleading
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-24fix some warningsdzwdz
2021-07-24sysexit() now overrides all registersdzwdz
when doing anything more complex than starting a new program, you pretty much need to pass a full register dump. otherwise stuff will break
2021-07-24save all registers on syscallsdzwdz
2021-07-21fix init stack alignmentdzwdz
2021-07-20per-process virtual memorydzwdz
VGA is only mapped into the virtual memory because there are no other ways of interacting with the OS.
2021-07-18move all kernel sources to src/kernel/dzwdz
2021-07-10a sensible source structuredzwdz
The idea is that src/kernel/ is only allowed to interface with the hardware using whatever's defined in src/arch/generic.h. I'll probably write a small script for checking this later on. This is a giant commit so I've probably fucked something up. It boots fine on Bochs and QEMU, so at least there's that.
2021-07-10separate the source code from object files; more modular Makefiledzwdz