mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-27 21:24:11 -04:00
strat: statically allocate additional threads
This commit is contained in:
parent
fbb5730369
commit
535e49a38d
17 changed files with 123 additions and 42 deletions
|
@ -182,7 +182,11 @@ namespace sts::pm::impl {
|
|||
};
|
||||
|
||||
/* Process Tracking globals. */
|
||||
os::Thread g_process_track_thread;
|
||||
void ProcessTrackingMain(void *arg);
|
||||
|
||||
constexpr size_t ProcessTrackThreadStackSize = 0x4000;
|
||||
constexpr int ProcessTrackThreadPriority = 0x15;
|
||||
os::StaticThread<ProcessTrackThreadStackSize> g_process_track_thread(&ProcessTrackingMain, nullptr, ProcessTrackThreadPriority);
|
||||
|
||||
/* Process lists. */
|
||||
ProcessList g_process_list;
|
||||
|
@ -468,8 +472,6 @@ namespace sts::pm::impl {
|
|||
R_TRY(resource::InitializeResourceManager());
|
||||
|
||||
/* Start thread. */
|
||||
/* TODO: Allocate thread stack resources statically, will require PR to libnx. */
|
||||
R_ASSERT(g_process_track_thread.Initialize(&ProcessTrackingMain, nullptr, 0x4000, 0x15));
|
||||
R_ASSERT(g_process_track_thread.Start());
|
||||
|
||||
return ResultSuccess;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue