kernel/process: move current process to kernel instance
Two functional change: QueryProcessMemory uses the process passed from handle instead current_process Thread::Stop() uses TLS from owner_process instead of current_process
This commit is contained in:
@ -184,6 +184,9 @@ public:
|
||||
/// Retrieves a process from the current list of processes.
|
||||
SharedPtr<Process> GetProcessById(u32 process_id) const;
|
||||
|
||||
SharedPtr<Process> GetCurrentProcess() const;
|
||||
void SetCurrentProcess(SharedPtr<Process> process);
|
||||
|
||||
private:
|
||||
std::unique_ptr<ResourceLimitList> resource_limits;
|
||||
std::atomic<u32> next_object_id{0};
|
||||
@ -194,6 +197,8 @@ private:
|
||||
|
||||
// Lists all processes that exist in the current session.
|
||||
std::vector<SharedPtr<Process>> process_list;
|
||||
|
||||
SharedPtr<Process> current_process;
|
||||
};
|
||||
|
||||
} // namespace Kernel
|
||||
|
Reference in New Issue
Block a user