SWDEV-496106 - Use lock_ops to avoid race condition in safe_stream.
Change-Id: I5e98c34a41434e2f7d2e6406ea30ddcf01b1091c
This commit is contained in:
committed by
Karthik Jayaprakash
szülő
25a893658a
commit
39b64b57d9
@@ -261,6 +261,7 @@ class MemoryPool : public amd::ReferenceCountedObject {
|
||||
|
||||
/// Add a safe stream for quick looks-ups if event dependencies option is enabled
|
||||
void AddSafeStream(Stream* event_stream, Stream* wait_stream) {
|
||||
amd::ScopedLock lock(lock_pool_ops_);
|
||||
if (EventDependencies()) {
|
||||
free_heap_.AddSafeStream(event_stream, wait_stream);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user