[kernel] Protect process::m_threads with a lock

Another spot I meant to go back and clean up with a lock - found it when
a process with threads running on two CPUs exited, and the scheduler
tried to delete the process on both CPUs.
This commit is contained in:
Justin C. Miller
2023-02-14 20:25:19 -08:00
parent bce01591f3
commit 2c2398b549
2 changed files with 16 additions and 1 deletions

View File

@@ -111,6 +111,7 @@ private:
vm_space m_space;
util::vector<thread*> m_threads;
util::spinlock m_threads_lock;
util::node_set<j6_handle_t, j6_handle_invalid, heap_allocated> m_handles;
util::spinlock m_handles_lock;