mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 12:52:44 +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
				
			
		|  | @ -137,7 +137,7 @@ private: | |||
|     HashMap<u16, NonnullLockRefPtr<ReceiveCompletion>> m_completions; | ||||
| 
 | ||||
|     Spinlock<LockRank::None> m_thread_lock {}; | ||||
|     LockRefPtr<Thread> m_thread; | ||||
|     RefPtr<Thread> m_thread; | ||||
|     Atomic<bool> m_thread_running { false }; | ||||
|     Atomic<bool, AK::MemoryOrder::memory_order_relaxed> m_thread_shutdown { false }; | ||||
| }; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling