1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 11:05:09 +00:00

Kernel: Rename "descriptor" to "description" where appropriate.

Now that FileDescription is called that, variables of that type should not
be called "descriptor". This is kinda wordy but we'll get used to it.
This commit is contained in:
Andreas Kling 2019-06-13 22:03:04 +02:00
parent 1c5677032a
commit c1bbd40b9e
17 changed files with 285 additions and 285 deletions

View file

@ -96,34 +96,34 @@ bool Scheduler::pick_next()
}
if (thread.state() == Thread::BlockedRead) {
ASSERT(thread.m_blocked_descriptor);
ASSERT(thread.m_blocked_description);
// FIXME: Block until the amount of data wanted is available.
if (thread.m_blocked_descriptor->can_read())
if (thread.m_blocked_description->can_read())
thread.unblock();
return IterationDecision::Continue;
}
if (thread.state() == Thread::BlockedWrite) {
ASSERT(thread.m_blocked_descriptor != -1);
if (thread.m_blocked_descriptor->can_write())
ASSERT(thread.m_blocked_description != -1);
if (thread.m_blocked_description->can_write())
thread.unblock();
return IterationDecision::Continue;
}
if (thread.state() == Thread::BlockedConnect) {
auto& descriptor = *thread.m_blocked_descriptor;
auto& socket = *descriptor.socket();
auto& description = *thread.m_blocked_description;
auto& socket = *description.socket();
if (socket.is_connected())
thread.unblock();
return IterationDecision::Continue;
}
if (thread.state() == Thread::BlockedReceive) {
auto& descriptor = *thread.m_blocked_descriptor;
auto& socket = *descriptor.socket();
auto& description = *thread.m_blocked_description;
auto& socket = *description.socket();
// FIXME: Block until the amount of data wanted is available.
bool timed_out = now_sec > socket.receive_deadline().tv_sec || (now_sec == socket.receive_deadline().tv_sec && now_usec >= socket.receive_deadline().tv_usec);
if (timed_out || descriptor.can_read()) {
if (timed_out || description.can_read()) {
thread.unblock();
return IterationDecision::Continue;
}
@ -138,13 +138,13 @@ bool Scheduler::pick_next()
}
}
for (int fd : thread.m_select_read_fds) {
if (process.m_fds[fd].descriptor->can_read()) {
if (process.m_fds[fd].description->can_read()) {
thread.unblock();
return IterationDecision::Continue;
}
}
for (int fd : thread.m_select_write_fds) {
if (process.m_fds[fd].descriptor->can_write()) {
if (process.m_fds[fd].description->can_write()) {
thread.unblock();
return IterationDecision::Continue;
}