summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2022-07-17kernel/virt_cpy: error struct, better error handlingdzwdz
2022-07-17amd64: remove dead code, combine shared codedzwdz
2022-07-16amd64: all tests passdzwdz
2022-07-16amd64: back at the shell!dzwdz
2022-07-16amd64: init can print to the terminal nowdzwdz
2022-07-16amd64: seemingly working syscalls (SYSCALL/SYSRET)dzwdz
2022-07-16amd64: just enough paging support to map initdzwdz
2022-07-16amd64: barely boot into kernel codedzwdz
2022-07-15i686: stop using pushal/popal in sysenter/sysexitdzwdz
2022-07-15i386/isr: don't use pushal; push registers manuallydzwdz
2022-07-14user/shell/cat: support reading from stdin until eofdzwdz
2022-07-14user: basic terminal driver with line editingdzwdz
2022-07-14kernel/driver/serial: allow writes even with pending readsdzwdz
2022-07-12user/tmpfs: basic read/writedzwdz
2022-07-12remove the incorrect OPEN_CREATE guards in fs driversdzwdz
2022-07-12user/shell: stdout redirectiondzwdz
2022-07-12user/shell: parse redirection syntaxdzwdz
2022-07-11user: add shorthand close() and fork() wrappers for those syscallsdzwdz
2022-07-11user: reorganize the userland sourcesdzwdz
2022-07-11init: file_reopen, keep stdin/stdout on their standard fdsdzwdz
2022-07-11init/stdlib: a more posix-y file apidzwdz
2022-07-10init/tests: semaphore pipe-based testdzwdz
2022-07-10syscalls: implement dupdzwdz
2022-07-10init/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-10kernel: implement killing processes stuck on pipesdzwdz
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-08kernel/proc: remove the type argument from process_handle_getdzwdz
2022-07-08kernel/syscalls: fix the SYSCALL_RETURN macro for returning pointersdzwdz
2022-07-08kernel/fsroot: use req_preprocess to calculate offsets everywheredzwdz
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: add the vfsreq_finish_short shorthand functiondzwdz
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-05shared: fix memsetdzwdz
2022-07-05init/ps2: support inserting special characters with ctrl, tty styledzwdz
2022-07-01kernel/fsroot: respect offset when reading rootdzwdz
2022-07-01init/fs: move the kernel stuff to /kdev/dzwdz
2022-07-01kernel: disable klogdzwdz
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-30kernel: get lint to shut up about undeclared variablesdzwdz
2022-06-30syscall_wrappers: generate casts so the compiler doesn't complaindzwdz
2022-06-30shared/mem: explicitly discard the const qualifier in memchrdzwdz