Age | Commit message (Collapse) | Author |
|
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.
|
|
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.
|
|
this is big in terms of speed, it avoids a lot of unnecessary context
switches
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
i don't think uint8_t can alias. char can
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
i think that making the call a bit more "transparent" makes the code
nicer
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
this will be needed for storing vfs_op's properly
|
|
|