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

Kernel: Turn Thread::current and Process::current into functions

This allows us to query the current thread and process on a
per processor basis
This commit is contained in:
Tom 2020-06-28 15:34:31 -06:00 committed by Andreas Kling
parent cdc78515b6
commit 16783bd14d
39 changed files with 518 additions and 369 deletions

View file

@ -55,7 +55,7 @@ Socket::Socket(int domain, int type, int protocol)
, m_type(type)
, m_protocol(protocol)
{
auto& process = *Process::current;
auto& process = *Process::current();
m_origin = { process.pid(), process.uid(), process.gid() };
}
@ -82,7 +82,7 @@ RefPtr<Socket> Socket::accept()
#endif
auto client = m_pending.take_first();
ASSERT(!client->is_connected());
auto& process = *Process::current;
auto& process = *Process::current();
client->m_acceptor = { process.pid(), process.uid(), process.gid() };
client->m_connected = true;
client->m_role = Role::Accepted;