os: refactor/rewrite entire namespace.

This commit is contained in:
Michael Scire 2020-04-08 02:21:35 -07:00
parent 6193283f03
commit 065485b971
181 changed files with 5353 additions and 1929 deletions

View file

@ -28,9 +28,9 @@ namespace ams::fatal::srv {
class TaskThread {
NON_COPYABLE(TaskThread);
private:
static constexpr int TaskThreadPriority = 15;
static constexpr s32 TaskThreadPriority = -13;
private:
os::Thread thread;
os::ThreadType thread;
private:
static void RunTaskImpl(void *arg) {
ITask *task = reinterpret_cast<ITask *>(arg);
@ -42,8 +42,8 @@ namespace ams::fatal::srv {
public:
TaskThread() { /* ... */ }
void StartTask(ITask *task) {
R_ABORT_UNLESS(this->thread.Initialize(&RunTaskImpl, task, task->GetStack(), task->GetStackSize(), TaskThreadPriority));
R_ABORT_UNLESS(this->thread.Start());
R_ABORT_UNLESS(os::CreateThread(std::addressof(this->thread), RunTaskImpl, task, task->GetStack(), task->GetStackSize(), TaskThreadPriority, 3));
os::StartThread(std::addressof(this->thread));
}
};