mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-15 07:34:23 -04:00
ams: centralize system thread definitions
This commit is contained in:
parent
d77fe98203
commit
3da0cda4ae
32 changed files with 254 additions and 40 deletions
|
@ -27,8 +27,6 @@ namespace ams::fatal::srv {
|
|||
|
||||
class TaskThread {
|
||||
NON_COPYABLE(TaskThread);
|
||||
private:
|
||||
static constexpr s32 TaskThreadPriority = -13;
|
||||
private:
|
||||
os::ThreadType thread;
|
||||
private:
|
||||
|
@ -42,7 +40,8 @@ namespace ams::fatal::srv {
|
|||
public:
|
||||
TaskThread() { /* ... */ }
|
||||
void StartTask(ITask *task) {
|
||||
R_ABORT_UNLESS(os::CreateThread(std::addressof(this->thread), RunTaskImpl, task, task->GetStack(), task->GetStackSize(), TaskThreadPriority, 3));
|
||||
R_ABORT_UNLESS(os::CreateThread(std::addressof(this->thread), RunTaskImpl, task, task->GetStack(), task->GetStackSize(), AMS_GET_SYSTEM_THREAD_PRIORITY(fatalsrv, FatalTaskThread), 3));
|
||||
os::SetThreadNamePointer(std::addressof(this->thread), AMS_GET_SYSTEM_THREAD_NAME(fatalsrv, FatalTaskThread));
|
||||
os::StartThread(std::addressof(this->thread));
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue