Age | Commit message (Collapse) | Author | |
---|---|---|---|
2022-07-18 | syscalls: implement execbuf | dzwdz | |
i have been planning to implement something like this for a while now. it should be faster when doing consecutive syscalls (to be tested). it will also be helpful in writing the elf loader | |||
2022-07-16 | amd64: back at the shell! | dzwdz | |
2022-07-10 | syscalls: implement dup | 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 | 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-05 | kernel: initial partial pipe support | dzwdz | |
2022-07-01 | kernel: add the debug_klog syscall for tracking down process ids | dzwdz | |
2022-06-29 | kernel/vfs: add the OPEN_CREATE flag | dzwdz | |
2022-05-26 | syscalls/memflag: FINDFREE flag | dzwdz | |
2022-05-06 | syscalls: merge fork() and fs_fork2() | dzwdz | |
2022-05-02 | meta: write a script to generate `src/init/syscalls.c` | dzwdz | |
2022-05-02 | syscalls: fork() noreap flag | dzwdz | |
2022-04-12 | kernel: make all sizes unsigned, sort out the sign mess | dzwdz | |
2022-03-27 | shared/syscalls: change some pointer types to void* | dzwdz | |
2021-11-20 | kernel: fs_wait returns a success val; the op type is put in the struct | dzwdz | |
2021-11-16 | kernel/vfs: add a capacity field to fs_wait_response | dzwdz | |
2021-11-02 | fork2() refactor: implement fs_fork2() | dzwdz | |
2021-11-02 | fork2 refactor: every process now has (only) a single controlled vfs_backend | dzwdz | |
2021-10-04 | remove support for processes returning strings on exit | dzwdz | |
This isn't really all that useful, it doesn't enable anything that wasn't possible before. With it removed I'll be able to implement process_exit() in a much simpler way. | |||
2021-09-20 | add an offset parameter to read() and write() | dzwdz | |
2021-09-20 | use a single struct for all fs_wait return values | dzwdz | |
2021-09-18 | put the `handle_t` typedef in `shared/types.h` | dzwdz | |
2021-09-18 | merge `kernel/types.h` and `init/types.h` | dzwdz | |
2021-09-15 | fs_wait: pass the file ID too | dzwdz | |
2021-09-14 | merge the `syscall_handler` and `_syscall` declarations | dzwdz | |
i think that making the call a bit more "transparent" makes the code nicer | |||
2021-09-12 | simplify `fs_respond`'s signature | dzwdz | |
2021-09-12 | implement part of `fs_respond` | dzwdz | |
2021-09-12 | barebones `memflag()` implementation - letting the user allocate pages | dzwdz | |
2021-09-12 | implement most of fs_wait | dzwdz | |
awaited_req is a garbage name but i couldn't come up with a better one. i also have no idea how to handle all the failure states | |||
2021-09-11 | replace `user_ptr` with a linux-style `__user` annotation | dzwdz | |
2021-09-09 | basic _syscall_fs_wait() impl, doesn't pass the req yet | dzwdz | |
2021-09-07 | implement fs_create(), front/back fs handles | dzwdz | |
2021-09-05 | error out when <*/types.h> isn't included in headers which need it | dzwdz | |
2021-09-05 | remove the fd_ / fs_ prefixes from syscall names | dzwdz | |
2021-09-04 | rename file descriptors to handles | dzwdz | |
2021-08-25 | change the signature of _syscall_fd_mount | dzwdz | |
2021-08-24 | switch to using user_ptr for pointers coming from userland | dzwdz | |
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-24 | replace () with (void) in function definitions | dzwdz | |
`()` means that any amt of arguments will be accepted, which isn't what i want | |||
2021-08-24 | move syscalls.h to shared/syscalls.h | dzwdz | |