summaryrefslogtreecommitdiff
path: root/src/KingSystem/Utils/Thread
diff options
context:
space:
mode:
Diffstat (limited to 'src/KingSystem/Utils/Thread')
-rw-r--r--src/KingSystem/Utils/Thread/Event.cpp4
-rw-r--r--src/KingSystem/Utils/Thread/Event.h4
-rw-r--r--src/KingSystem/Utils/Thread/GameTaskThread.cpp4
-rw-r--r--src/KingSystem/Utils/Thread/GameTaskThread.h4
-rw-r--r--src/KingSystem/Utils/Thread/LowPrioThreadMgr.cpp4
-rw-r--r--src/KingSystem/Utils/Thread/LowPrioThreadMgr.h4
-rw-r--r--src/KingSystem/Utils/Thread/ManagedTask.cpp4
-rw-r--r--src/KingSystem/Utils/Thread/ManagedTask.h4
-rw-r--r--src/KingSystem/Utils/Thread/ManagedTaskHandle.cpp4
-rw-r--r--src/KingSystem/Utils/Thread/ManagedTaskHandle.h4
-rw-r--r--src/KingSystem/Utils/Thread/MessageDispatcher.h2
-rw-r--r--src/KingSystem/Utils/Thread/Task.cpp4
-rw-r--r--src/KingSystem/Utils/Thread/Task.h4
-rw-r--r--src/KingSystem/Utils/Thread/TaskData.h4
-rw-r--r--src/KingSystem/Utils/Thread/TaskMgr.cpp4
-rw-r--r--src/KingSystem/Utils/Thread/TaskMgr.h6
-rw-r--r--src/KingSystem/Utils/Thread/TaskQueue.cpp4
-rw-r--r--src/KingSystem/Utils/Thread/TaskQueue.h4
-rw-r--r--src/KingSystem/Utils/Thread/TaskQueueBase.cpp7
-rw-r--r--src/KingSystem/Utils/Thread/TaskQueueBase.h4
-rw-r--r--src/KingSystem/Utils/Thread/TaskQueueLock.cpp4
-rw-r--r--src/KingSystem/Utils/Thread/TaskQueueLock.h4
-rw-r--r--src/KingSystem/Utils/Thread/TaskThread.cpp4
-rw-r--r--src/KingSystem/Utils/Thread/TaskThread.h4
24 files changed, 50 insertions, 49 deletions
diff --git a/src/KingSystem/Utils/Thread/Event.cpp b/src/KingSystem/Utils/Thread/Event.cpp
index 1c16be54..b7e3fef7 100644
--- a/src/KingSystem/Utils/Thread/Event.cpp
+++ b/src/KingSystem/Utils/Thread/Event.cpp
@@ -1,6 +1,6 @@
#include "KingSystem/Utils/Thread/Event.h"
-namespace ksys::util {
+namespace ksys {
Event::Event() = default;
@@ -51,4 +51,4 @@ bool Event::isSignalSet() const {
return mSignalSet == 1;
}
-} // namespace ksys::util
+} // namespace ksys
diff --git a/src/KingSystem/Utils/Thread/Event.h b/src/KingSystem/Utils/Thread/Event.h
index 6db2822a..22956d47 100644
--- a/src/KingSystem/Utils/Thread/Event.h
+++ b/src/KingSystem/Utils/Thread/Event.h
@@ -4,7 +4,7 @@
#include <thread/seadEvent.h>
#include "KingSystem/Utils/Types.h"
-namespace ksys::util {
+namespace ksys {
class Event {
public:
@@ -32,4 +32,4 @@ private:
KSYS_CHECK_SIZE_NX150(sead::Event, 0x30);
KSYS_CHECK_SIZE_NX150(Event, 0x40);
-} // namespace ksys::util
+} // namespace ksys
diff --git a/src/KingSystem/Utils/Thread/GameTaskThread.cpp b/src/KingSystem/Utils/Thread/GameTaskThread.cpp
index eacd9e64..c6f6eab1 100644
--- a/src/KingSystem/Utils/Thread/GameTaskThread.cpp
+++ b/src/KingSystem/Utils/Thread/GameTaskThread.cpp
@@ -1,6 +1,6 @@
#include "KingSystem/Utils/Thread/GameTaskThread.h"
-namespace ksys::util {
+namespace ksys {
GameTaskThread::GameTaskThread(const sead::SafeString& name, sead::Heap* heap, s32 priority,
sead::MessageQueue::BlockType block_type, long quit_msg,
@@ -12,4 +12,4 @@ void GameTaskThread::quit(bool) {
Thread::quit(false);
}
-} // namespace ksys::util
+} // namespace ksys
diff --git a/src/KingSystem/Utils/Thread/GameTaskThread.h b/src/KingSystem/Utils/Thread/GameTaskThread.h
index a16e9f68..6f1d6f8d 100644
--- a/src/KingSystem/Utils/Thread/GameTaskThread.h
+++ b/src/KingSystem/Utils/Thread/GameTaskThread.h
@@ -3,7 +3,7 @@
#include "KingSystem/Utils/Thread/TaskThread.h"
#include "KingSystem/Utils/Types.h"
-namespace ksys::util {
+namespace ksys {
class GameTaskThread : public TaskThread {
SEAD_RTTI_OVERRIDE(GameTaskThread, TaskThread)
@@ -24,4 +24,4 @@ protected:
};
KSYS_CHECK_SIZE_NX150(GameTaskThread, 0x1a8);
-} // namespace ksys::util
+} // namespace ksys
diff --git a/src/KingSystem/Utils/Thread/LowPrioThreadMgr.cpp b/src/KingSystem/Utils/Thread/LowPrioThreadMgr.cpp
index 35f69e48..e69ad4a7 100644
--- a/src/KingSystem/Utils/Thread/LowPrioThreadMgr.cpp
+++ b/src/KingSystem/Utils/Thread/LowPrioThreadMgr.cpp
@@ -5,7 +5,7 @@
#include "KingSystem/Utils/SafeDelete.h"
#include "KingSystem/Utils/Thread/TaskQueue.h"
-namespace ksys::util {
+namespace ksys {
SEAD_SINGLETON_DISPOSER_IMPL(LowPrioThreadMgr)
@@ -116,4 +116,4 @@ void LowPrioThreadMgr::resumeAllTasks() {
void LowPrioThreadMgr::sub_710127AC40() {}
-} // namespace ksys::util
+} // namespace ksys
diff --git a/src/KingSystem/Utils/Thread/LowPrioThreadMgr.h b/src/KingSystem/Utils/Thread/LowPrioThreadMgr.h
index 08ddfe85..e5a24383 100644
--- a/src/KingSystem/Utils/Thread/LowPrioThreadMgr.h
+++ b/src/KingSystem/Utils/Thread/LowPrioThreadMgr.h
@@ -7,7 +7,7 @@
#include "KingSystem/Utils/Thread/TaskMgr.h"
#include "KingSystem/Utils/Thread/TaskThread.h"
-namespace ksys::util {
+namespace ksys {
class LowPrioThreadMgr {
SEAD_SINGLETON_DISPOSER(LowPrioThreadMgr)
@@ -55,4 +55,4 @@ private:
sead::Buffer<CoreThreadTask> mCoreThreadTasks{};
};
-} // namespace ksys::util
+} // namespace ksys
diff --git a/src/KingSystem/Utils/Thread/ManagedTask.cpp b/src/KingSystem/Utils/Thread/ManagedTask.cpp
index 8a0f3dfd..2c2c1c58 100644
--- a/src/KingSystem/Utils/Thread/ManagedTask.cpp
+++ b/src/KingSystem/Utils/Thread/ManagedTask.cpp
@@ -3,7 +3,7 @@
#include "KingSystem/Utils/Thread/TaskMgr.h"
#include "KingSystem/Utils/Thread/TaskQueueLock.h"
-namespace ksys::util {
+namespace ksys {
ManagedTask::ManagedTask(sead::Heap* heap) : Task(heap) {}
@@ -103,4 +103,4 @@ void ManagedTask::detachHandle() {
}
}
-} // namespace ksys::util
+} // namespace ksys
diff --git a/src/KingSystem/Utils/Thread/ManagedTask.h b/src/KingSystem/Utils/Thread/ManagedTask.h
index 8116de41..32e00b01 100644
--- a/src/KingSystem/Utils/Thread/ManagedTask.h
+++ b/src/KingSystem/Utils/Thread/ManagedTask.h
@@ -3,7 +3,7 @@
#include "KingSystem/Utils/Thread/Task.h"
#include "KingSystem/Utils/Types.h"
-namespace ksys::util {
+namespace ksys {
class ManagedTaskHandle;
class TaskMgr;
@@ -43,4 +43,4 @@ protected:
};
KSYS_CHECK_SIZE_NX150(ManagedTask, 0xc0);
-} // namespace ksys::util
+} // namespace ksys
diff --git a/src/KingSystem/Utils/Thread/ManagedTaskHandle.cpp b/src/KingSystem/Utils/Thread/ManagedTaskHandle.cpp
index 874bf46f..60f9e5cb 100644
--- a/src/KingSystem/Utils/Thread/ManagedTaskHandle.cpp
+++ b/src/KingSystem/Utils/Thread/ManagedTaskHandle.cpp
@@ -3,7 +3,7 @@
#include "KingSystem/Utils/Thread/TaskQueueBase.h"
#include "KingSystem/Utils/Thread/TaskQueueLock.h"
-namespace ksys::util {
+namespace ksys {
ManagedTaskHandle::ManagedTaskHandle() = default;
@@ -104,4 +104,4 @@ inline void ManagedTaskHandle::decrementRef_() {
}
}
-} // namespace ksys::util
+} // namespace ksys
diff --git a/src/KingSystem/Utils/Thread/ManagedTaskHandle.h b/src/KingSystem/Utils/Thread/ManagedTaskHandle.h
index 61c41c51..04beea9c 100644
--- a/src/KingSystem/Utils/Thread/ManagedTaskHandle.h
+++ b/src/KingSystem/Utils/Thread/ManagedTaskHandle.h
@@ -4,7 +4,7 @@
#include <time/seadTickSpan.h>
#include "KingSystem/Utils/Types.h"
-namespace ksys::util {
+namespace ksys {
class ManagedTask;
class TaskQueueBase;
@@ -57,4 +57,4 @@ private:
};
KSYS_CHECK_SIZE_NX150(ManagedTaskHandle, 0x28);
-} // namespace ksys::util
+} // namespace ksys
diff --git a/src/KingSystem/Utils/Thread/MessageDispatcher.h b/src/KingSystem/Utils/Thread/MessageDispatcher.h
index 2a6706d5..7cbc7175 100644
--- a/src/KingSystem/Utils/Thread/MessageDispatcher.h
+++ b/src/KingSystem/Utils/Thread/MessageDispatcher.h
@@ -154,7 +154,7 @@ private:
sead::Buffer<u8> mBoolBuffer;
sead::ObjList<u8*> mBools;
sead::CriticalSection mCritSection;
- util::Event mUpdateEndEvent;
+ Event mUpdateEndEvent;
sead::Atomic<int> mNumEntries = 0;
};
diff --git a/src/KingSystem/Utils/Thread/Task.cpp b/src/KingSystem/Utils/Thread/Task.cpp
index e2ba464f..fd740fbb 100644
--- a/src/KingSystem/Utils/Thread/Task.cpp
+++ b/src/KingSystem/Utils/Thread/Task.cpp
@@ -4,7 +4,7 @@
#include "KingSystem/Utils/Thread/TaskQueueLock.h"
#include "KingSystem/Utils/Thread/TaskThread.h"
-namespace ksys::util {
+namespace ksys {
TaskDelegateSetter::TaskDelegateSetter() = default;
@@ -282,4 +282,4 @@ void Task::setLaneId(u8 id) {
mLaneId = id;
}
-} // namespace ksys::util
+} // namespace ksys
diff --git a/src/KingSystem/Utils/Thread/Task.h b/src/KingSystem/Utils/Thread/Task.h
index 5c9d95c3..da7aab87 100644
--- a/src/KingSystem/Utils/Thread/Task.h
+++ b/src/KingSystem/Utils/Thread/Task.h
@@ -9,7 +9,7 @@
#include "KingSystem/Utils/Thread/Event.h"
#include "KingSystem/Utils/Types.h"
-namespace ksys::util {
+namespace ksys {
class Task;
class TaskQueueBase;
@@ -203,4 +203,4 @@ KSYS_CHECK_SIZE_NX150(Task, 0xa8);
inline void Task::prepare_(TaskRequest*) {}
-} // namespace ksys::util
+} // namespace ksys
diff --git a/src/KingSystem/Utils/Thread/TaskData.h b/src/KingSystem/Utils/Thread/TaskData.h
index 68db7ce0..251d1413 100644
--- a/src/KingSystem/Utils/Thread/TaskData.h
+++ b/src/KingSystem/Utils/Thread/TaskData.h
@@ -2,10 +2,10 @@
#include <prim/seadRuntimeTypeInfo.h>
-namespace ksys::util {
+namespace ksys {
class TaskData {
SEAD_RTTI_BASE(TaskData)
};
-} // namespace ksys::util
+} // namespace ksys
diff --git a/src/KingSystem/Utils/Thread/TaskMgr.cpp b/src/KingSystem/Utils/Thread/TaskMgr.cpp
index 6f6c58c3..4f4f8e02 100644
--- a/src/KingSystem/Utils/Thread/TaskMgr.cpp
+++ b/src/KingSystem/Utils/Thread/TaskMgr.cpp
@@ -4,7 +4,7 @@
#include "KingSystem/Utils/Thread/ManagedTask.h"
#include "KingSystem/Utils/Thread/TaskThread.h"
-namespace ksys::util {
+namespace ksys {
TaskMgr::TaskMgr(sead::Heap* heap)
: mTasksCS(heap), mCS2(heap), mNewFreeTaskEvent(heap, true), mEvent2(heap, true) {
@@ -209,4 +209,4 @@ ManagedTask* TaskMgr::fetchIdleTask_(bool retry_until_success) {
}
}
-} // namespace ksys::util
+} // namespace ksys
diff --git a/src/KingSystem/Utils/Thread/TaskMgr.h b/src/KingSystem/Utils/Thread/TaskMgr.h
index 4c8fa131..d0bc03eb 100644
--- a/src/KingSystem/Utils/Thread/TaskMgr.h
+++ b/src/KingSystem/Utils/Thread/TaskMgr.h
@@ -15,7 +15,7 @@
#include "KingSystem/Utils/Thread/ManagedTask.h"
#include "KingSystem/Utils/Types.h"
-namespace ksys::util {
+namespace ksys {
class ManagedTaskHandle;
class TaskRequest;
@@ -93,7 +93,7 @@ protected:
template <typename TaskType>
void makeTaskType_(ManagedTask** task) {
- *task = new TaskType(getCurrentHeap());
+ *task = new TaskType(util::getCurrentHeap());
}
template <typename TaskType>
@@ -114,4 +114,4 @@ protected:
};
KSYS_CHECK_SIZE_NX150(TaskMgr, 0x158);
-} // namespace ksys::util
+} // namespace ksys
diff --git a/src/KingSystem/Utils/Thread/TaskQueue.cpp b/src/KingSystem/Utils/Thread/TaskQueue.cpp
index cf76c768..bb0d886b 100644
--- a/src/KingSystem/Utils/Thread/TaskQueue.cpp
+++ b/src/KingSystem/Utils/Thread/TaskQueue.cpp
@@ -1,7 +1,7 @@
#include "KingSystem/Utils/Thread/TaskQueue.h"
-namespace ksys::util {
+namespace ksys {
TaskQueue::TaskQueue(sead::Heap* heap) : TaskQueueBase(heap), mCS(heap) {}
-} // namespace ksys::util
+} // namespace ksys
diff --git a/src/KingSystem/Utils/Thread/TaskQueue.h b/src/KingSystem/Utils/Thread/TaskQueue.h
index 6792a783..0706834c 100644
--- a/src/KingSystem/Utils/Thread/TaskQueue.h
+++ b/src/KingSystem/Utils/Thread/TaskQueue.h
@@ -3,7 +3,7 @@
#include <thread/seadCriticalSection.h>
#include "KingSystem/Utils/Thread/TaskQueueBase.h"
-namespace ksys::util {
+namespace ksys {
class TaskQueue : public TaskQueueBase {
SEAD_RTTI_OVERRIDE(TaskQueue, TaskQueueBase)
@@ -18,4 +18,4 @@ private:
};
KSYS_CHECK_SIZE_NX150(TaskQueue, 0xd0);
-} // namespace ksys::util
+} // namespace ksys
diff --git a/src/KingSystem/Utils/Thread/TaskQueueBase.cpp b/src/KingSystem/Utils/Thread/TaskQueueBase.cpp
index 5310726c..10c55680 100644
--- a/src/KingSystem/Utils/Thread/TaskQueueBase.cpp
+++ b/src/KingSystem/Utils/Thread/TaskQueueBase.cpp
@@ -7,7 +7,7 @@
#include "KingSystem/Utils/Thread/TaskQueueLock.h"
#include "KingSystem/Utils/Thread/TaskThread.h"
-namespace ksys::util {
+namespace ksys {
static const auto cSleepSpan = sead::TickSpan::makeFromMicroSeconds(10);
@@ -333,7 +333,8 @@ void TaskQueueBase::notifyThreadsForNewTasks() {
}
if (retry_count >= 2)
- PrintDebug(sead::FormatFixedSafeString<128>("↓↓↓\nリトライ回数 %d 回\n↑↑↑\n", retry_count));
+ util::PrintDebug(
+ sead::FormatFixedSafeString<128>("↓↓↓\nリトライ回数 %d 回\n↑↑↑\n", retry_count));
}
bool TaskQueueBase::push(const PushArg& arg) {
@@ -482,4 +483,4 @@ void TaskQueueBase::fetchTask(Task** out_task) {
unlock();
}
-} // namespace ksys::util
+} // namespace ksys
diff --git a/src/KingSystem/Utils/Thread/TaskQueueBase.h b/src/KingSystem/Utils/Thread/TaskQueueBase.h
index e90d4a24..14d94316 100644
--- a/src/KingSystem/Utils/Thread/TaskQueueBase.h
+++ b/src/KingSystem/Utils/Thread/TaskQueueBase.h
@@ -11,7 +11,7 @@
#include "KingSystem/Utils/Thread/Event.h"
#include "KingSystem/Utils/Types.h"
-namespace ksys::util {
+namespace ksys {
class Task;
class TaskQueueLock;
@@ -156,4 +156,4 @@ protected:
};
KSYS_CHECK_SIZE_NX150(TaskQueueBase, 0x90);
-} // namespace ksys::util
+} // namespace ksys
diff --git a/src/KingSystem/Utils/Thread/TaskQueueLock.cpp b/src/KingSystem/Utils/Thread/TaskQueueLock.cpp
index be7b1c5e..758a2a95 100644
--- a/src/KingSystem/Utils/Thread/TaskQueueLock.cpp
+++ b/src/KingSystem/Utils/Thread/TaskQueueLock.cpp
@@ -1,7 +1,7 @@
#include "KingSystem/Utils/Thread/TaskQueueLock.h"
#include "KingSystem/Utils/Thread/TaskQueueBase.h"
-namespace ksys::util {
+namespace ksys {
TaskQueueLock::TaskQueueLock() = default;
@@ -23,4 +23,4 @@ void TaskQueueLock::unlock() {
}
}
-} // namespace ksys::util
+} // namespace ksys
diff --git a/src/KingSystem/Utils/Thread/TaskQueueLock.h b/src/KingSystem/Utils/Thread/TaskQueueLock.h
index 2bc44035..da95b798 100644
--- a/src/KingSystem/Utils/Thread/TaskQueueLock.h
+++ b/src/KingSystem/Utils/Thread/TaskQueueLock.h
@@ -4,7 +4,7 @@
#include "KingSystem/Utils/Thread/TaskThread.h"
#include "KingSystem/Utils/Types.h"
-namespace ksys::util {
+namespace ksys {
class TaskQueueBase;
@@ -25,4 +25,4 @@ private:
};
KSYS_CHECK_SIZE_NX150(TaskQueueLock, 0x10);
-} // namespace ksys::util
+} // namespace ksys
diff --git a/src/KingSystem/Utils/Thread/TaskThread.cpp b/src/KingSystem/Utils/Thread/TaskThread.cpp
index 27dcd4e9..447143df 100644
--- a/src/KingSystem/Utils/Thread/TaskThread.cpp
+++ b/src/KingSystem/Utils/Thread/TaskThread.cpp
@@ -4,7 +4,7 @@
#include "KingSystem/Utils/Thread/TaskQueue.h"
#include "KingSystem/Utils/Thread/TaskQueueLock.h"
-namespace ksys::util {
+namespace ksys {
TaskThread::TaskThread(const sead::SafeString& name, sead::Heap* heap, s32 priority,
sead::MessageQueue::BlockType block_type,
@@ -259,4 +259,4 @@ void TaskThread::cancelCurrentTask() {
mTask->cancel();
}
-} // namespace ksys::util
+} // namespace ksys
diff --git a/src/KingSystem/Utils/Thread/TaskThread.h b/src/KingSystem/Utils/Thread/TaskThread.h
index 8d2cb559..d8b4b9b7 100644
--- a/src/KingSystem/Utils/Thread/TaskThread.h
+++ b/src/KingSystem/Utils/Thread/TaskThread.h
@@ -7,7 +7,7 @@
#include "KingSystem/Utils/Thread/Event.h"
#include "KingSystem/Utils/Types.h"
-namespace ksys::util {
+namespace ksys {
class Task;
class TaskQueueBase;
@@ -106,4 +106,4 @@ protected:
};
KSYS_CHECK_SIZE_NX150(TaskThread, 0x1a0);
-} // namespace ksys::util
+} // namespace ksys