1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 00:27:43 +00:00

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.
This commit is contained in:
Andreas Kling 2019-12-22 11:51:24 +01:00
parent 16812f0f98
commit 4b8851bd01
3 changed files with 14 additions and 2 deletions

View file

@ -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);