summaryrefslogtreecommitdiff
path: root/src/init
AgeCommit message (Collapse)Author
2022-07-09kernel/pipes: process queueingdzwdz
2022-07-09init/test: mostly clean up the existing testsdzwdz
2022-07-09syscalls/pipe: turn into a POSIX-style api with separate rw endsdzwdz
Without separate read/write ends you can't tell when there are no more writers left if you have multiple readers. Consider this piece of code: int fd = pipe(); fork(); // execution continues in 2 processes while (read(fd, &some_buf, sizeof somebuf) >= 0) { ... } Once both processes call `read()`, it's obvious that no writes are possible - all the processes that hold a reference to the pipe are currently stuck on a `read()` call, so the kernel could just make it return an error in both. But, what then? It's still possible to write to the pipe, and you can't know if the other process will do that. Thus, if you don't want to miss any output, you have to keep reading the pipe. Forever. Both processes end up stuck. Having separate read/write ends prevents that.
2022-07-08init/fs: remove fs_respond_delegate, clean updzwdz
2022-07-08syscall/fs_respond: get the file id from the buf argumentdzwdz
Previously, file ids could only be positive integers, so their range was 31 bits - not enough to represent the entire memory. Now, pointers can be safely used as file ids.
2022-07-07kernel/vfs: delegate support in _syscall_fs_respond!dzwdz
this is big in terms of speed, it avoids a lot of unnecessary context switches
2022-07-07shared: add a flags argument to _syscall_fs_responddzwdz
2022-07-06kernel: don't panic on nonexistent syscallsdzwdz
2022-07-06kernel/pipes: read & write supportdzwdz
2022-07-05kernel: initial partial pipe supportdzwdz
2022-07-05init/ps2: support inserting special characters with ctrl, tty styledzwdz
2022-07-01init/fs: move the kernel stuff to /kdev/dzwdz
2022-07-01init/fs: remember to close fs handles in fork2_n_mountdzwdz
2022-07-01kernel: add the debug_klog syscall for tracking down process idsdzwdz
2022-07-01init/stdlib: implement snprintfdzwdz
2022-06-30syscall_wrappers: generate casts so the compiler doesn't complaindzwdz
2022-06-29init/fs: tmpfs driver with support for creating new filesdzwdz
2022-06-29kernel/vfs: add the OPEN_CREATE flagdzwdz
2022-05-29init/ps2: fix double key capturedzwdz
2022-05-29init/malloc: use FINDFREEdzwdz
2022-05-26syscalls/memflag: FINDFREE flagdzwdz
2022-05-26init: dead simple mallocdzwdz
2022-05-26init: remove useless macrodzwdz
2022-05-21syscall/memflag: implement freeing memorydzwdz
2022-05-21init/ps2: use a ring buffer for the backlogdzwdz
2022-05-06syscalls: merge fork() and fs_fork2()dzwdz
2022-05-05kernel: ps2 driver is now a separate backenddzwdz
2022-05-02meta: write a script to generate `src/init/syscalls.c`dzwdz
2022-05-02syscalls: fork() noreap flagdzwdz
2022-05-02shared: fix some stuff i broke + compiler warningsdzwdz
2022-05-02kernel/vfs: pass `close()` calls to fs handlersdzwdz
2022-05-01init/fs: make directory listings respect offsetsdzwdz
2022-05-01init/libc: libc_file wrapper over the raw syscallsdzwdz
2022-05-01init/cat: read files until EOFdzwdz
2022-04-28init: run shells from a child process to expose bug in process_free()dzwdz
2022-04-28kernel/proc: simplify `process_seed`dzwdz
2022-04-21kernel: recursive kill()dzwdz
2022-04-15kernel/vfs: don't hang on orphaned vfs callsdzwdz
2022-04-15kernel/vfs: don't hang waiting for a vfs backend after it exit()sdzwdz
2022-04-14kernel: port init's `printf` implementationdzwdz
2022-04-14init: refactor printfdzwdz
2022-04-14init/fs: fix `fs_dir_inject`dzwdz
the loop wasn't bounder, so was copying garbage - including multiple null bytes also, the trailing slash was appended even if the injected path didn't have one
2022-04-13init/test: add a fork() stress testdzwdz
this currently crashes the kernel. the point is to stop it from doing that
2022-04-12shared: fix some minor warningsdzwdz
2022-04-12kernel: make all sizes unsigned, sort out the sign messdzwdz
2022-04-11kernel: shutdown when init quitsdzwdz
thanks to this it's easier to power off - instead of waiting for all processses to quit (which now involves writing `quit` both on serial and ps/2), one of those can just somehow kill init. currently this is just done by exiting from any shell - init will return from await and exit too
2022-04-10init/stdlib: don't make printf() assume that stdout is fd 0dzwdz
2022-04-10kernel/i386: rewrite the serial driver to wait for IRQdzwdz
proper multiprocess support!
2022-04-10init/fs: handle delegated reads in a subprocessdzwdz
first off: this is horrible. there's no CoW, so this is horribly slow. the sole purpose of this is to let the userland delegate handle multiple requests at once, because i'm implementing concurrent IO and I kinda need that. it's possible that handling of multiple requests could be handled in a better way - but this could be good enough once i implement CoW
2022-04-10kernel: idle processdzwdz