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:
parent
6bb0dbe8bf
commit
c59f8cd663
3 changed files with 19 additions and 5 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue