Make append and setLastQueuedCommand atomic

Two threads can enqueue to the same HostQueue (HostQueue::enqueue)
and result in last queued command being the first one reachine queue_.enqueue

NOTE: Temporarly make setLastQueuedCommand empty function to pass the build

Change-Id: Id09c3a28d184986f52b2ec86a2f6a18c40df1f0b


[ROCm/clr commit: 3d15a1e291]
此提交包含在:
Christophe Paquot
2020-07-10 08:32:15 -07:00
提交者 Saleel Kudchadker
父節點 03361fed43
當前提交 f14d79c587
共有 3 個檔案被更改,包括 11 行新增 和 16 行删除
-3
查看文件
@@ -258,9 +258,6 @@ void Command::enqueue() {
ClPrint(LOG_DEBUG, LOG_CMD, "command is enqueued: %p", this);
queue_->append(*this);
if (IS_HIP) {
queue_->setLastQueuedCommand(this);
}
queue_->flush();
if ((queue_->device().settings().waitCommand_ && (type_ != 0)) ||
((commandWaitBits_ & 0x2) != 0)) {