summaryrefslogtreecommitdiff
path: root/src/KingSystem/Utils/Thread/TaskQueueBase.cpp
diff options
context:
space:
mode:
authorLéo Lam <leo@leolam.fr>2020-09-20 17:59:41 +0200
committerLéo Lam <leo@leolam.fr>2020-09-22 18:43:03 +0200
commit8756ccdd07c690e61f9896830ca8bec12d4cfee1 (patch)
tree6c8ecf11d0a9792b655ead8d71a6db3cfef90178 /src/KingSystem/Utils/Thread/TaskQueueBase.cpp
parent5ac991b0e05026b5ae25bfb7541d085f8d7000a2 (diff)
ksys: Start adding OverlayArenaSystem
Diffstat (limited to 'src/KingSystem/Utils/Thread/TaskQueueBase.cpp')
-rw-r--r--src/KingSystem/Utils/Thread/TaskQueueBase.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/KingSystem/Utils/Thread/TaskQueueBase.cpp b/src/KingSystem/Utils/Thread/TaskQueueBase.cpp
index 430fdbf2..b6303ccb 100644
--- a/src/KingSystem/Utils/Thread/TaskQueueBase.cpp
+++ b/src/KingSystem/Utils/Thread/TaskQueueBase.cpp
@@ -57,7 +57,6 @@ void TaskQueueBase::clear() {
mQueueEmptyEvent.wait();
}
-// NON_MATCHING: swapped operands for a csel. The arg.set_flag1 check looks suspicious.
bool TaskQueueBase::init(const InitArg& arg) {
if (arg.max_num_threads == 0)
return false;
@@ -65,10 +64,7 @@ bool TaskQueueBase::init(const InitArg& arg) {
if (!mThreads.tryAllocBuffer(arg.max_num_threads, arg.heap))
return false;
- if (!arg.enable_locks)
- mFlags.reset(Flag::Lock);
- else
- mFlags.set(Flag::Lock);
+ mFlags.change(Flag::Lock, arg.enable_locks);
if (arg.num_lanes <= 0 || arg.num_lanes > 0x100)
return false;