Age | Commit message (Collapse) | Author | |
---|---|---|---|
2022-07-11 | user: reorganize the userland sources | dzwdz | |
2022-07-10 | init/tests: semaphore pipe-based test | dzwdz | |
2022-07-10 | syscalls: implement dup | dzwdz | |
2022-07-10 | init/lib: implement "evil semaphores" | dzwdz | |
I started implementing native semaphores in the kernel, but then I've realized that I can implement them in userland using pipes. Thus, this hot garbage was born. | |||
2022-07-09 | kernel/pipes: process queueing | dzwdz | |
2022-07-09 | init/test: mostly clean up the existing tests | dzwdz | |
2022-07-09 | syscalls/pipe: turn into a POSIX-style api with separate rw ends | dzwdz | |
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-06 | kernel: don't panic on nonexistent syscalls | dzwdz | |
2022-07-06 | kernel/pipes: read & write support | dzwdz | |
2022-07-05 | kernel: initial partial pipe support | dzwdz | |
2022-06-29 | kernel/vfs: add the OPEN_CREATE flag | dzwdz | |
2022-05-26 | syscalls/memflag: FINDFREE flag | dzwdz | |
2022-05-26 | init: dead simple malloc | dzwdz | |
2022-05-21 | syscall/memflag: implement freeing memory | dzwdz | |
2022-05-06 | syscalls: merge fork() and fs_fork2() | dzwdz | |
2022-05-02 | syscalls: fork() noreap flag | dzwdz | |
2022-05-02 | shared: fix some stuff i broke + compiler warnings | dzwdz | |
2022-05-02 | kernel/vfs: pass `close()` calls to fs handlers | dzwdz | |
2022-04-28 | kernel/proc: simplify `process_seed` | dzwdz | |
2022-04-15 | kernel/vfs: don't hang on orphaned vfs calls | dzwdz | |
2022-04-15 | kernel/vfs: don't hang waiting for a vfs backend after it exit()s | dzwdz | |
2022-04-13 | init/test: add a fork() stress test | dzwdz | |
this currently crashes the kernel. the point is to stop it from doing that | |||
2021-11-04 | init/tests: ensure that tests exit successfully | dzwdz | |
2021-10-15 | init/tests: write some actual tests - test_await and test_faults | dzwdz | |
2021-10-15 | init/tests: make the test(s) static | dzwdz | |
2021-10-15 | init/tests: remove test_fs, as it doesn't even test anything | dzwdz | |
2021-10-15 | init/tests: implement a run_forked wrapper | dzwdz | |
2021-10-15 | init: only run tests when prompted from the shell | dzwdz | |
2021-10-15 | init: move the tests to their own directory | dzwdz | |