From 8cfbffb82bfd091489cf91be5e192acf9f9fd7b3 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. [ROCm/clr commit: 0d719c514f2b60ab9533211e6d747a6ccf572d6d] --- projects/clr/hipamd/src/hip_hcc.cpp | 4 ---- projects/clr/hipamd/src/hip_hcc_internal.h | 3 --- 2 files changed, 7 deletions(-) diff --git a/projects/clr/hipamd/src/hip_hcc.cpp b/projects/clr/hipamd/src/hip_hcc.cpp index 9856dc1905..538a9039bf 100644 --- a/projects/clr/hipamd/src/hip_hcc.cpp +++ b/projects/clr/hipamd/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/projects/clr/hipamd/src/hip_hcc_internal.h b/projects/clr/hipamd/src/hip_hcc_internal.h index ce8041ef63..4008df1574 100644 --- a/projects/clr/hipamd/src/hip_hcc_internal.h +++ b/projects/clr/hipamd/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; };