summaryrefslogtreecommitdiff
path: root/Kernel/Process.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-12-22 11:51:24 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-12-22 12:38:01 +0100
commit4b8851bd01c7e78f44754aa288122b75e9e37485 (patch)
treeb72912689a75041ae4491d38c5480fb910feda10 /Kernel/Process.h
parent16812f0f9832769330e41421f9057b0b5a8b7b61 (diff)
downloadserenity-4b8851bd01c7e78f44754aa288122b75e9e37485.zip
Kernel: Make TID's be unique PID's
This is a little strange, but it's how I understand things should work. The first thread in a new process now has TID == PID. Additional threads subsequently spawned in that process all have unique TID's generated by the PID allocator. TIDs are now globally unique.
Diffstat (limited to 'Kernel/Process.h')
-rw-r--r--Kernel/Process.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Kernel/Process.h b/Kernel/Process.h
index bcd9053182..acfb901266 100644
--- a/Kernel/Process.h
+++ b/Kernel/Process.h
@@ -310,6 +310,7 @@ private:
friend class Region;
Process(Thread*& first_thread, const String& name, uid_t, gid_t, pid_t ppid, RingLevel, RefPtr<Custody> cwd = nullptr, RefPtr<Custody> executable = nullptr, TTY* = nullptr, Process* fork_parent = nullptr);
+ static pid_t allocate_pid();
Range allocate_range(VirtualAddress, size_t);