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

Kernel: PID/TID typing

This compiles, and contains exactly the same bugs as before.
The regex 'FIXME: PID/' should reveal all markers that I left behind, including:
- Incomplete conversion
- Issues or things that look fishy
- Actual bugs that will go wrong during runtime
This commit is contained in:
Ben Wiederhake 2020-08-08 17:32:34 +02:00 committed by Andreas Kling
parent f225321184
commit f5744a6f2f
26 changed files with 136 additions and 111 deletions

View file

@ -48,13 +48,13 @@ void SharedBuffer::sanity_check(const char* what)
if (found_refs != m_total_refs) {
dbg() << what << " sanity -- SharedBuffer{" << this << "} id: " << m_shbuf_id << " has total refs " << m_total_refs << " but we found " << found_refs;
for (const auto& ref : m_refs) {
dbg() << " ref from pid " << ref.pid << ": refcnt " << ref.count;
dbg() << " ref from pid " << ref.pid.value() << ": refcnt " << ref.count;
}
ASSERT_NOT_REACHED();
}
}
bool SharedBuffer::is_shared_with(pid_t peer_pid) const
bool SharedBuffer::is_shared_with(ProcessID peer_pid) const
{
LOCKER(shared_buffers().lock(), Lock::Mode::Shared);
if (m_global)
@ -102,7 +102,7 @@ void* SharedBuffer::ref_for_process_and_get_address(Process& process)
ASSERT_NOT_REACHED();
}
void SharedBuffer::share_with(pid_t peer_pid)
void SharedBuffer::share_with(ProcessID peer_pid)
{
LOCKER(shared_buffers().lock());
if (m_global)
@ -146,7 +146,7 @@ void SharedBuffer::deref_for_process(Process& process)
ASSERT_NOT_REACHED();
}
void SharedBuffer::disown(pid_t pid)
void SharedBuffer::disown(ProcessID pid)
{
LOCKER(shared_buffers().lock());
for (size_t i = 0; i < m_refs.size(); ++i) {