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

WindowServer: Prune more kernel-related gunk.

This commit is contained in:
Andreas Kling 2019-02-16 12:25:47 +01:00
parent 09aaa41e62
commit c3d36a5fe9
4 changed files with 9 additions and 18 deletions

View file

@ -6,7 +6,6 @@
#include <WindowServer/WSWindow.h>
#include <WindowServer/WSWindowManager.h>
#include <WindowServer/WSAPITypes.h>
#include <Kernel/MemoryManager.h>
#include <Kernel/Process.h>
Lockable<HashMap<int, WSClientConnection*>>* s_connections;
@ -42,17 +41,9 @@ WSClientConnection* WSClientConnection::ensure_for_client_id(int client_id)
WSClientConnection::WSClientConnection(int fd)
: m_fd(fd)
{
int rc = WSMessageLoop::the().server_process().sys$ioctl(m_fd, 413, (int)&m_pid);
int rc = current->sys$ioctl(m_fd, 413, (int)&m_pid);
ASSERT(rc == 0);
{
InterruptDisabler disabler;
auto* process = Process::from_pid(m_pid);
ASSERT(process);
m_process = process->make_weak_ptr();
m_client_id = (int)process;
}
if (!s_connections)
s_connections = new Lockable<HashMap<int, WSClientConnection*>>;
LOCKER(s_connections->lock());