1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 11:37:34 +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

@ -35,9 +35,9 @@ namespace Kernel {
class ThreadTracer {
public:
static NonnullOwnPtr<ThreadTracer> create(pid_t tracer) { return make<ThreadTracer>(tracer); }
static NonnullOwnPtr<ThreadTracer> create(ProcessID tracer) { return make<ThreadTracer>(tracer); }
pid_t tracer_pid() const { return m_tracer_pid; }
ProcessID tracer_pid() const { return m_tracer_pid; }
bool has_pending_signal(u32 signal) const { return m_pending_signals & (1 << (signal - 1)); }
void set_signal(u32 signal) { m_pending_signals |= (1 << (signal - 1)); }
void unset_signal(u32 signal) { m_pending_signals &= ~(1 << (signal - 1)); }
@ -54,10 +54,10 @@ public:
return m_regs.value();
}
explicit ThreadTracer(pid_t);
explicit ThreadTracer(ProcessID);
private:
pid_t m_tracer_pid { -1 };
ProcessID m_tracer_pid { -1 };
// This is a bitmap for signals that are sent from the tracer to the tracee
// TODO: Since we do not currently support sending signals