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

Kernel: Replace "current" with Thread::current and Process::current

Suggested by Sergey. The currently running Thread and Process are now
Thread::current and Process::current respectively. :^)
This commit is contained in:
Andreas Kling 2020-02-17 15:04:27 +01:00
parent 4f4af24b9d
commit 48f7c28a5c
37 changed files with 257 additions and 252 deletions

View file

@ -49,7 +49,7 @@ void TCPSocket::set_state(State new_state)
{
#ifdef TCP_SOCKET_DEBUG
kprintf("%s(%u) TCPSocket{%p} state moving from %s to %s\n",
current->process().name().characters(), current->pid(), this,
Process::current->name().characters(), Process::current->pid(), this,
to_string(m_state), to_string(new_state));
#endif
@ -385,7 +385,7 @@ KResult TCPSocket::protocol_connect(FileDescription& description, ShouldBlock sh
m_direction = Direction::Outgoing;
if (should_block == ShouldBlock::Yes) {
if (current->block<Thread::ConnectBlocker>(description) != Thread::BlockResult::WokeNormally)
if (Thread::current->block<Thread::ConnectBlocker>(description) != Thread::BlockResult::WokeNormally)
return KResult(-EINTR);
ASSERT(setup_state() == SetupState::Completed);
if (has_error()) {