kernel: Improvements to process cleanup. (#6680)

* kernel: Properly clean up process threads on exit.

* kernel: Track process-owned memory and free on destruction.

* apt: Implement DoApplicationJump via home menu when available.

* kernel: Move TLS allocation management to owning process.
This commit is contained in:
Steveice10 2023-07-16 17:54:29 -07:00 committed by GitHub
parent 8b6b58a364
commit 9cb14044ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 272 additions and 179 deletions

View file

@ -135,10 +135,10 @@ public:
std::shared_ptr<Process> CreateProcess(std::shared_ptr<CodeSet> code_set);
/**
* Removes a process from the kernel process list
* @param process Process to remove
* Terminates a process, killing its threads and removing it from the process list.
* @param process Process to terminate.
*/
void RemoveProcess(std::shared_ptr<Process> process);
void TerminateProcess(std::shared_ptr<Process> process);
/**
* Creates and returns a new thread. The new thread is immediately scheduled
@ -208,7 +208,7 @@ public:
* @param name Optional object name, used for debugging purposes.
*/
ResultVal<std::shared_ptr<SharedMemory>> CreateSharedMemory(
Process* owner_process, u32 size, MemoryPermission permissions,
std::shared_ptr<Process> owner_process, u32 size, MemoryPermission permissions,
MemoryPermission other_permissions, VAddr address = 0,
MemoryRegion region = MemoryRegion::BASE, std::string name = "Unknown");