From 6cf8f07cfc20bbcc311a238c4eba5043b05634fb Mon Sep 17 00:00:00 2001
From: Florian Schmaus <flow@cs.fau.de>
Date: Fri, 25 Feb 2022 09:13:06 +0100
Subject: [PATCH] [MemoryManager] Fix stale reference to WsClQueue

The MemoryManager uses lib::adt::wsqueue::Default as work-stealing
queue implementation. The reference to WsClQueue would break if e.g.,
ws_queue_default=cl4, since the type would not exist.
---
 emper/MemoryManager.hpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/emper/MemoryManager.hpp b/emper/MemoryManager.hpp
index 14bd2e1f..6f389671 100644
--- a/emper/MemoryManager.hpp
+++ b/emper/MemoryManager.hpp
@@ -86,13 +86,13 @@ thread_local adt::BoundedBumpArray<void, WORKER_EXCLUSIVE_QUEUE_SIZE>
 		MemoryManager<T, WS_QUEUE_SIZE, WORKER_EXCLUSIVE_QUEUE_SIZE>::workerExclusiveQueue;
 
 template <typename T, intptr_t WS_QUEUE_SIZE, size_t WORKER_EXCLUSIVE_QUEUE_SIZE>
-thread_local adt::WsClQueue<void*, WS_QUEUE_SIZE>
+thread_local lib::adt::wsqueue::Default<void*, WS_QUEUE_SIZE>
 		MemoryManager<T, WS_QUEUE_SIZE, WORKER_EXCLUSIVE_QUEUE_SIZE>::queue;
 
 template <typename T, intptr_t WS_QUEUE_SIZE, size_t WORKER_EXCLUSIVE_QUEUE_SIZE>
 MemoryManager<T, WS_QUEUE_SIZE, WORKER_EXCLUSIVE_QUEUE_SIZE>::MemoryManager(Runtime& runtime)
 		: workerCount(runtime.getWorkerCount()) {
-	queues = new adt::WsClQueue<void*, WS_QUEUE_SIZE>*[workerCount];
+	queues = new lib::adt::wsqueue::Default<void*, WS_QUEUE_SIZE>*[workerCount];
 	workerExclusiveQueues =
 			new adt::BoundedBumpArray<void, WORKER_EXCLUSIVE_QUEUE_SIZE>*[workerCount];
 
-- 
GitLab