fix hipStreamAddCallback, block future work on stream (#1934)

This commit is contained in:
Jeff Daily
2020-03-19 03:46:04 -07:00
committed by GitHub
parent d90a0c05c0
commit 1444f850ac
5 changed files with 587 additions and 33 deletions
-14
View File
@@ -1520,20 +1520,6 @@ hipError_t ihipStreamSynchronize(TlsData *tls, hipStream_t stream) {
return e;
}
void ihipStreamCallbackHandler(ihipStreamCallback_t* cb) {
hipError_t e = hipSuccess;
// Synchronize stream
tprintf(DB_SYNC, "ihipStreamCallbackHandler wait on stream %s\n",
ToString(cb->_stream).c_str());
GET_TLS();
e = ihipStreamSynchronize(tls, cb->_stream);
// Call registered callback function
cb->_callback(cb->_stream, e, cb->_userData);
delete cb;
}
//---
// Get the stream to use for a command submission.
//