From a1f3b587fb6c29b3217e2d3baac00448dc208f83 Mon Sep 17 00:00:00 2001 From: Siu Chi Chan Date: Mon, 4 Jun 2018 17:29:04 -0400 Subject: [PATCH] remove the _ready flag in ihipStreamCallback_t and the mutex that protects it. --- src/hip_hcc.cpp | 4 ---- src/hip_hcc_internal.h | 3 --- 2 files changed, 7 deletions(-) diff --git a/src/hip_hcc.cpp b/src/hip_hcc.cpp index 9856dc1905..538a9039bf 100644 --- a/src/hip_hcc.cpp +++ b/src/hip_hcc.cpp @@ -1445,10 +1445,6 @@ hipError_t ihipStreamSynchronize(hipStream_t stream) { void ihipStreamCallbackHandler(ihipStreamCallback_t* cb) { hipError_t e = hipSuccess; - // Notify hipStreamAddCallback that callback handler thread is active - std::lock_guard guard(cb->_mtx); - cb->_ready = true; - // Synchronize stream tprintf(DB_SYNC, "ihipStreamCallbackHandler wait on stream %s\n", ToString(cb->_stream).c_str()); diff --git a/src/hip_hcc_internal.h b/src/hip_hcc_internal.h index ce8041ef63..4008df1574 100644 --- a/src/hip_hcc_internal.h +++ b/src/hip_hcc_internal.h @@ -620,13 +620,10 @@ class ihipStreamCallback_t { public: ihipStreamCallback_t(hipStream_t stream, hipStreamCallback_t callback, void* userData) : _stream(stream), _callback(callback), _userData(userData) { - _ready = false; }; hipStream_t _stream; hipStreamCallback_t _callback; void* _userData; - std::mutex _mtx; - bool _ready; };