summaryrefslogtreecommitdiff
path: root/src/KingSystem/Utils/Thread/TaskMgr.cpp
diff options
context:
space:
mode:
authorLéo Lam <leo@leolam.fr>2022-02-27 12:48:28 +0100
committerLéo Lam <leo@leolam.fr>2022-02-27 12:50:52 +0100
commitdf36d656650198b3cbf140e2982752a95b3f2c6d (patch)
tree1af53905980b13aa03ab2f78dd548407370eb98c /src/KingSystem/Utils/Thread/TaskMgr.cpp
parenta5641860025aed373da045ef1ac43a6487529932 (diff)
Revert "Add #ifdef declarations for NON_MATCHING code"
This reverts commit 42807160cfb33af9f3cf2fa6b0ba98f232208cdb. It makes searching for NON_MATCHING comment descriptions much less convenient in most text editors or IDEs, and we want the function CSV to be the single source of truth for function statuses. Having a function marked as matching but not built because of a stray #ifdef would be bad.
Diffstat (limited to 'src/KingSystem/Utils/Thread/TaskMgr.cpp')
-rw-r--r--src/KingSystem/Utils/Thread/TaskMgr.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/KingSystem/Utils/Thread/TaskMgr.cpp b/src/KingSystem/Utils/Thread/TaskMgr.cpp
index f8aa6f2c..b5eec563 100644
--- a/src/KingSystem/Utils/Thread/TaskMgr.cpp
+++ b/src/KingSystem/Utils/Thread/TaskMgr.cpp
@@ -80,8 +80,7 @@ void TaskMgr::submitRequest(TaskMgrRequest& request) {
request.task = nullptr;
}
-// reorderings
-#ifdef NON_MATCHING
+// NON_MATCHING: reorderings
bool TaskMgr::fetchIdleTaskForRequest_(TaskMgrRequest& request, bool retry_until_success) {
if (!hasTasks())
return false;
@@ -109,7 +108,6 @@ bool TaskMgr::fetchIdleTaskForRequest_(TaskMgrRequest& request, bool retry_until
request.task = task;
return true;
}
-#endif
void TaskMgr::freeTask(ManagedTask* task) {
auto lock = sead::makeScopedLock(mCS2);
@@ -157,8 +155,7 @@ bool TaskMgr::trySubmitRequest(TaskMgrRequest& request) {
return ok;
}
-// the factory invoke function pointer is loaded earlier in the original code
-#ifdef NON_MATCHING
+// NON_MATCHING: the factory invoke function pointer is loaded earlier in the original code
void TaskMgr::init(s32 num_tasks, sead::Heap* heap, ManagedTaskFactory& factory) {
if (!heap->isFreeable())
mFlags.reset(Flag::HeapIsFreeable);
@@ -180,7 +177,6 @@ void TaskMgr::init(s32 num_tasks, sead::Heap* heap, ManagedTaskFactory& factory)
factory(&mTask);
}
-#endif
bool TaskMgr::hasTasks() const {
return mTasks.size() > 0;