1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 22:08:10 +00:00

Kernel: Scheduler donations need to verify that the beneficiary is valid.

Add a Thread::is_thread(void*) helper that we can use to check that the
incoming donation beneficiary is a valid thread. The O(n) here is a bit sad
and we should eventually rethink the process/thread table data structures.
This commit is contained in:
Andreas Kling 2019-04-17 12:41:51 +02:00
parent 6bb0dbe8bf
commit c59f8cd663
3 changed files with 19 additions and 5 deletions

View file

@ -34,6 +34,7 @@ public:
static void finalize_dying_threads();
static Vector<Thread*> all_threads();
static bool is_thread(void*);
int tid() const { return m_tid; }
int pid() const;