SWDEV-391178 - Extern monitor to avoid copy in multithreading.

Defining monitor in header cause copy and hence it's moved to cpp.

Change-Id: Ib07bbde2808d9cb2af9349076f777e8a5b28d210


[ROCm/clr commit: e8eb1772f2]
Этот коммит содержится в:
Jaydeep Patel
2023-04-10 07:51:22 +00:00
коммит произвёл Jaydeepkumar Patel
родитель 82219d2fb1
Коммит 06bc6d9980
2 изменённых файлов: 2 добавлений и 2 удалений
+1 -1
Просмотреть файл
@@ -26,7 +26,7 @@
#include "utils/versions.hpp"
std::vector<hip::Device*> g_devices;
amd::Monitor g_hipInitlock{"hipInit lock"};
namespace hip {
thread_local TlsAggregator tls;
amd::Context* host_context = nullptr;
+1 -1
Просмотреть файл
@@ -71,7 +71,7 @@ typedef struct ihipIpcEventHandle_st {
const char* ihipGetErrorName(hipError_t hip_error);
static amd::Monitor g_hipInitlock{"hipInit lock"};
extern amd::Monitor g_hipInitlock;
#define HIP_INIT(noReturn) {\
amd::ScopedLock lock(g_hipInitlock); \
if (!amd::Runtime::initialized()) { \