Thread safety violation fixes - Events & USM

Change-Id: I57de59f204d9fd4407be768d0b14bf579dae967d
Signed-off-by: Vinod Tipparaju <vinod.tipparaju@intel.com>
This commit is contained in:
Vinod Tipparaju
2020-08-17 17:33:26 +05:30
committed by sys_ocldev
parent 3b6786aeb9
commit 083edd1a3e
5 changed files with 4 additions and 64 deletions

View File

@@ -67,7 +67,7 @@ ze_result_t CommandQueueImp::synchronize(uint64_t timeout) {
ze_result_t CommandQueueImp::synchronizeByPollingForTaskCount(uint64_t timeout) {
UNRECOVERABLE_IF(csr == nullptr);
auto taskCountToWait = this->taskCount;
auto taskCountToWait = getTaskCount();
bool enableTimeout = true;
int64_t timeoutMicroseconds = static_cast<int64_t>(timeout);
if (timeout == std::numeric_limits<uint64_t>::max()) {

View File

@@ -91,7 +91,7 @@ struct CommandQueueImp : public CommandQueue {
NEO::CommandStreamReceiver *csr = nullptr;
const ze_command_queue_desc_t desc;
NEO::LinearStream *commandStream = nullptr;
uint32_t taskCount = 0;
std::atomic<uint32_t> taskCount{0};
std::vector<Kernel *> printfFunctionContainer;
bool gsbaInit = false;
bool frontEndInit = false;