Revert "Avoid lock for last queued command"

This reverts commit dc4e09a63a.

Reason for revert: <INSERT REASONING HERE>

Change-Id: Ie10442c9447f010bb90c679b6cffca5b48b8d054
This commit is contained in:
German Andryeyev
2020-06-04 15:17:45 -04:00
förälder d8ca3c632c
incheckning 44bc0cb35d
2 ändrade filer med 13 tillägg och 13 borttagningar
+3 -1
Visa fil
@@ -126,6 +126,7 @@ class CommandQueue : public RuntimeObject {
rtCUs_(rtCUs),
priority_(priority),
queueLock_("CommandQueue::queueLock"),
lastCmdLock_("LastQueuedCommand"),
device_(device),
context_(context),
cuMask_(cuMask){}
@@ -134,6 +135,7 @@ class CommandQueue : public RuntimeObject {
uint rtCUs_; //!< The number of used RT compute units
Priority priority_; //!< Queue priority
Monitor queueLock_; //!< Lock protecting the queue
Monitor lastCmdLock_; //!< Lock protecting the last queued command
Device& device_; //!< The device
SharedReference<Context> context_; //!< The context of this command queue
const std::vector<uint32_t>& cuMask_; //!< The CU mask
@@ -185,7 +187,7 @@ class HostQueue : public CommandQueue {
private:
ConcurrentLinkedQueue<Command*> queue_; //!< The queue.
std::atomic<Command*> lastEnqueueCommand_; //!< The last submitted command
Command* lastEnqueueCommand_; //!< The last submitted command
//! Await commands and execute them as they become ready.
void loop(device::VirtualDevice* virtualDevice);