Age | Commit message (Collapse) | Author | |
---|---|---|---|
2022-07-11 | user: reorganize the userland sources | dzwdz | |
2022-07-11 | init: file_reopen, keep stdin/stdout on their standard fds | dzwdz | |
2022-07-11 | init/stdlib: a more posix-y file api | 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-08 | init/fs: remove fs_respond_delegate, clean up | dzwdz | |
2022-07-08 | syscall/fs_respond: get the file id from the buf argument | dzwdz | |
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-07 | kernel/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-07 | shared: add a flags argument to _syscall_fs_respond | dzwdz | |
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-07-05 | init/ps2: support inserting special characters with ctrl, tty style | dzwdz | |
2022-07-01 | init/fs: move the kernel stuff to /kdev/ | dzwdz | |
2022-07-01 | init/fs: remember to close fs handles in fork2_n_mount | dzwdz | |
2022-07-01 | kernel: add the debug_klog syscall for tracking down process ids | dzwdz | |
2022-07-01 | init/stdlib: implement snprintf | dzwdz | |
2022-06-30 | syscall_wrappers: generate casts so the compiler doesn't complain | dzwdz | |
2022-06-29 | init/fs: tmpfs driver with support for creating new files | dzwdz | |
2022-06-29 | kernel/vfs: add the OPEN_CREATE flag | dzwdz | |
2022-05-29 | init/ps2: fix double key capture | dzwdz | |
2022-05-29 | init/malloc: use FINDFREE | dzwdz | |
2022-05-26 | syscalls/memflag: FINDFREE flag | dzwdz | |
2022-05-26 | init: dead simple malloc | dzwdz | |
2022-05-26 | init: remove useless macro | dzwdz | |
2022-05-21 | syscall/memflag: implement freeing memory | dzwdz | |
2022-05-21 | init/ps2: use a ring buffer for the backlog | dzwdz | |
2022-05-06 | syscalls: merge fork() and fs_fork2() | dzwdz | |
2022-05-05 | kernel: ps2 driver is now a separate backend | dzwdz | |
2022-05-02 | meta: write a script to generate `src/init/syscalls.c` | 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-05-01 | init/fs: make directory listings respect offsets | dzwdz | |
2022-05-01 | init/libc: libc_file wrapper over the raw syscalls | dzwdz | |
2022-05-01 | init/cat: read files until EOF | dzwdz | |
2022-04-28 | init: run shells from a child process to expose bug in process_free() | dzwdz | |
2022-04-28 | kernel/proc: simplify `process_seed` | dzwdz | |
2022-04-21 | kernel: recursive kill() | 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-14 | kernel: port init's `printf` implementation | dzwdz | |
2022-04-14 | init: refactor printf | dzwdz | |
2022-04-14 | init/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-13 | init/test: add a fork() stress test | dzwdz | |
this currently crashes the kernel. the point is to stop it from doing that | |||
2022-04-12 | shared: fix some minor warnings | dzwdz | |