From 31ca701a3e3b04c75290af8af71a8d588e41ba83 Mon Sep 17 00:00:00 2001
From: foreman
Date: Tue, 3 Feb 2015 17:56:13 -0500
Subject: [PATCH] P4 to Git Change 1118228 by gandryey@gera-dev-w7 on
2015/02/03 16:17:12
ECR #304775 - Back out changelist 1117184
- There is a hang on CPU in conversion test
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/platform/command.cpp#67 edit
---
rocclr/runtime/platform/command.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/rocclr/runtime/platform/command.cpp b/rocclr/runtime/platform/command.cpp
index 5ced2fe631..98f13d014b 100644
--- a/rocclr/runtime/platform/command.cpp
+++ b/rocclr/runtime/platform/command.cpp
@@ -88,7 +88,10 @@ Event::setStatus(cl_int status, uint64_t timeStamp)
timeStamp = recordProfilingInfo(status, timeStamp);
}
- status_ = status;
+ if (!make_atomic(status_).compareAndSet(currentStatus, status)) {
+ // Somebody else beat us to it, let them deal with the release/signal.
+ return false;
+ }
if (callbacks_ != (CallBackEntry*)0) {
processCallbacks(status);