Age | Commit message (Collapse) | Author | |
---|---|---|---|
2022-08-19 | syscall/fs_wait: return a handle for each request | dzwdz | |
2022-08-19 | kernel: kzalloc | dzwdz | |
2022-08-04 | do some simple TODOs, organize the rest; general code maintainance | 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-05 | kernel: initial partial pipe support | dzwdz | |
2022-05-06 | kernel: remove the union in `struct handle` | dzwdz | |
2022-05-05 | kernel/vfs: rename the vfsreq funcs, merge vfsreq_finish & vfsreq_cancel | dzwdz | |
2022-05-04 | kernel: refcount vfs_backend | dzwdz | |
what a mess | |||
2022-05-02 | kernel/vfs: pass `close()` calls to fs handlers | dzwdz | |
2022-05-01 | kernel/proc: make handles separate refcounted objects | dzwdz | |
2021-09-04 | nuke the old handle code | dzwdz | |
2021-09-04 | rename file descriptors to handles | dzwdz | |