diff options
author | Andreas Kling <awesomekling@gmail.com> | 2018-12-03 00:42:48 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2018-12-03 00:42:48 +0100 |
commit | 4bc87dc7b99c4f7a9270e23e5958b4c93fe76033 (patch) | |
tree | 454b3423e27576dc04b0e6e15281d572c2eeaadd /Kernel/Process.cpp | |
parent | f6e27c2abe9da2ed1159cfc30618afc66bfbab79 (diff) | |
download | serenity-4bc87dc7b99c4f7a9270e23e5958b4c93fe76033.zip |
Share the "blocked-on file descriptor" number between read() and write().
A process can't be reading and writing at the same time, so it's fine for
them to share the variable for the blocked FD.
Diffstat (limited to 'Kernel/Process.cpp')
-rw-r--r-- | Kernel/Process.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp index b4e8b339d2..c47aaf5def 100644 --- a/Kernel/Process.cpp +++ b/Kernel/Process.cpp @@ -1055,7 +1055,7 @@ ssize_t Process::sys$read(int fd, void* outbuf, size_t nread) return -EBADF; if (descriptor->is_blocking()) { if (!descriptor->has_data_available_for_reading()) { - m_fdBlockedOnRead = fd; + m_blocked_fd = fd; block(BlockedRead); sched_yield(); if (m_was_interrupted_while_blocked) |