From 8756ccdd07c690e61f9896830ca8bec12d4cfee1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Sun, 20 Sep 2020 17:59:41 +0200 Subject: ksys: Start adding OverlayArenaSystem --- src/KingSystem/Utils/Thread/TaskQueueBase.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/KingSystem/Utils/Thread/TaskQueueBase.cpp') 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; -- cgit v1.2.3