mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:14:58 +00:00
Kernel: Stop using *LockRefPtr for Thread
These were stored in a bunch of places. The main one that's a bit iffy is the Mutex::m_holder one, which I'm going to simplify in a subsequent commit. In Plan9FS and WorkQueue, we can't make the NNRPs const due to initialization order problems. That's probably doable with further cleanup, but left as an exercise for our future selves. Before starting this, I expected the thread blockers to be a problem, but as it turns out they were super straightforward (for once!) as they don't mutate the thread after initiating a block, so they can just use simple const-ified NNRPs.
This commit is contained in:
parent
a098266ff5
commit
c3915e4058
9 changed files with 26 additions and 30 deletions
|
@ -101,7 +101,7 @@ private:
|
|||
// the lock is unlocked, it just means we don't know which threads hold it.
|
||||
// When locked exclusively, this is always the one thread that holds the
|
||||
// lock.
|
||||
LockRefPtr<Thread> m_holder;
|
||||
RefPtr<Thread> m_holder;
|
||||
size_t m_shared_holders { 0 };
|
||||
|
||||
struct BlockedThreadLists {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue