SWDEV-467540 - Fix reference of freed locks

1.Move global amd::monitor listenerLock before global
class runtime_tear_down as it will be referenced in
~RuntimeTearDown() after main(). It should be freed
later than runtime_tear_down.

2.Update  Device::~Device() to SVM free coopHostcallBuffer_
before context_ is released and freed.

Change-Id: I1d21378ff463477d3238d71e5e2a1a7d6b9147ad


[ROCm/clr commit: 544c45364f]
This commit is contained in:
taosang2 authored and Tao Sang committed 2024-06-18 13:58:36 -04:00
1 parent 5536be3e39
commit 20417d5b0f
3 files changed
+10 -7

No files matched your search

@@ -273,7 +273,7 @@ class HostcallListener {
};
HostcallListener* hostcallListener = nullptr;
amd::Monitor listenerLock("Hostcall listener lock");
extern amd::Monitor listenerLock;
constexpr static uint64_t kTimeoutFloor = K * K * 4;
constexpr static uint64_t kTimeoutCeil = K * K * 16;
static struct Init {