diff --git a/hipamd/src/hip_code_object.hpp b/hipamd/src/hip_code_object.hpp index 53e2f48fab..795bee004d 100644 --- a/hipamd/src/hip_code_object.hpp +++ b/hipamd/src/hip_code_object.hpp @@ -103,7 +103,8 @@ private: //Dynamic Code Object class DynCO : public CodeObject { - amd::Monitor dclock_{"Guards Dynamic Code object", true}; + // Guards Dynamic Code object + amd::Monitor dclock_{true}; public: DynCO() : device_id_(ihipGetDevice()), fb_info_(nullptr) {} @@ -151,7 +152,8 @@ private: //Static Code Object class StatCO: public CodeObject { - amd::Monitor sclock_{"Guards Static Code object", true}; + // Guards Static Code object + amd::Monitor sclock_{true}; public: StatCO(); virtual ~StatCO(); diff --git a/hipamd/src/hip_event.cpp b/hipamd/src/hip_event.cpp index 35c5ee120d..54871812ec 100644 --- a/hipamd/src/hip_event.cpp +++ b/hipamd/src/hip_event.cpp @@ -27,7 +27,8 @@ namespace hip { -static amd::Monitor eventSetLock{"Guards global event set"}; +// Guards global event set +static amd::Monitor eventSetLock{}; static std::unordered_set eventSet; bool Event::ready(eventType type) { diff --git a/hipamd/src/hip_event.hpp b/hipamd/src/hip_event.hpp index 5ff7da5dde..c44ab56b84 100644 --- a/hipamd/src/hip_event.hpp +++ b/hipamd/src/hip_event.hpp @@ -108,7 +108,7 @@ class Event { } public: - Event(uint32_t flags) : flags_(flags), lock_("hipEvent_t", true), + Event(uint32_t flags) : flags_(flags), lock_(true) /* hipEvent_t lock*/, event_(nullptr), unrecorded_(false), stream_(nullptr) { // No need to init event_ here as addMarker does that device_id_ = hip::getCurrentDevice()->deviceId(); // Created in current device ctx diff --git a/hipamd/src/hip_graph.cpp b/hipamd/src/hip_graph.cpp index 075544c2d4..2a03120975 100644 --- a/hipamd/src/hip_graph.cpp +++ b/hipamd/src/hip_graph.cpp @@ -31,8 +31,10 @@ extern std::unordered_map> GraphExecSt extern amd::Monitor GraphExecStatusLock_; std::vector g_captureStreams; -amd::Monitor g_captureStreamsLock{"StreamCaptureGlobalList"}; -amd::Monitor g_streamSetLock{"StreamCaptureset"}; +// StreamCaptureGlobalList lock +amd::Monitor g_captureStreamsLock{}; +// StreamCaptureset lock +amd::Monitor g_streamSetLock{}; std::unordered_set g_allCapturingStreams; hipError_t ihipGraphDebugDotPrint(hipGraph_t graph, const char* path, unsigned int flags); hipError_t ihipStreamUpdateCaptureDependencies(hipStream_t stream, hipGraphNode_t* dependencies, diff --git a/hipamd/src/hip_graph_internal.cpp b/hipamd/src/hip_graph_internal.cpp index 83d53b162c..f9465ca5a5 100644 --- a/hipamd/src/hip_graph_internal.cpp +++ b/hipamd/src/hip_graph_internal.cpp @@ -53,20 +53,25 @@ const char* GetGraphNodeTypeString(uint32_t op) { namespace hip { std::unordered_map> GraphExecStatus_ ROCCLR_INIT_PRIORITY(101); -amd::Monitor GraphExecStatusLock_ ROCCLR_INIT_PRIORITY(101){ - "Guards graph execution state", true}; +// Guards graph execution state +amd::Monitor GraphExecStatusLock_ ROCCLR_INIT_PRIORITY(101){true}; int GraphNode::nextID = 0; int Graph::nextID = 0; std::unordered_set GraphNode::nodeSet_; -amd::Monitor GraphNode::nodeSetLock_{"Guards global node set"}; +// Guards global node set +amd::Monitor GraphNode::nodeSetLock_{}; std::unordered_set Graph::graphSet_; -amd::Monitor Graph::graphSetLock_{"Guards global graph set"}; +// Guards global graph set +amd::Monitor Graph::graphSetLock_{}; std::unordered_set GraphExec::graphExecSet_; -amd::Monitor GraphExec::graphExecSetLock_{"Guards global exec graph set"}; +// Guards global exec graph set +amd::Monitor GraphExec::graphExecSetLock_{}; std::unordered_set UserObject::ObjectSet_; -amd::Monitor UserObject::UserObjectLock_{"Guards global user object"}; -amd::Monitor GraphNode::WorkerThreadLock_{"Guards mem map add/remove against work thread"}; +// Guards global user object +amd::Monitor UserObject::UserObjectLock_{}; +// Guards mem map add/remove against work thread +amd::Monitor GraphNode::WorkerThreadLock_{}; hipError_t GraphMemcpyNode1D::ValidateParams(void* dst, const void* src, size_t count, hipMemcpyKind kind) { diff --git a/hipamd/src/hip_internal.hpp b/hipamd/src/hip_internal.hpp index d9f26e4679..cec76d9bd2 100644 --- a/hipamd/src/hip_internal.hpp +++ b/hipamd/src/hip_internal.hpp @@ -453,8 +453,10 @@ public: /// HIP Device class class Device : public amd::ReferenceCountedObject { - amd::Monitor lock_{"Device lock", true}; - amd::Monitor streamSetLock{"Guards device stream set"}; + // Device lock + amd::Monitor lock_{true}; + // Guards device stream set + amd::Monitor streamSetLock{}; std::unordered_set streamSet; /// ROCclr context amd::Context* context_; diff --git a/hipamd/src/hip_memory.cpp b/hipamd/src/hip_memory.cpp index 72b934a56c..482916bd0a 100644 --- a/hipamd/src/hip_memory.cpp +++ b/hipamd/src/hip_memory.cpp @@ -28,7 +28,8 @@ #include "platform/external_memory.hpp" namespace hip { -amd::Monitor hipArraySetLock{"Guards global hipArray set"}; +// Guards global hipArray set +amd::Monitor hipArraySetLock{}; std::unordered_set hipArraySet; // ================================================================================================ diff --git a/hipamd/src/hip_mempool_impl.hpp b/hipamd/src/hip_mempool_impl.hpp index e397ceb79b..b38eb74d2a 100644 --- a/hipamd/src/hip_mempool_impl.hpp +++ b/hipamd/src/hip_mempool_impl.hpp @@ -199,7 +199,7 @@ class MemoryPool : public amd::ReferenceCountedObject { MemoryPool(hip::Device* device, const hipMemPoolProps* props = nullptr, bool phys_mem = false) : busy_heap_(device), free_heap_(device), - lock_pool_ops_("Pool operations", true), + lock_pool_ops_(true), /* Pool operations */ device_(device), shared_(nullptr), max_total_size_(0) { diff --git a/hipamd/src/hip_platform.hpp b/hipamd/src/hip_platform.hpp index 89efc69786..5cc30832a7 100644 --- a/hipamd/src/hip_platform.hpp +++ b/hipamd/src/hip_platform.hpp @@ -43,10 +43,12 @@ struct UniqueFD { namespace hip { class PlatformState { - amd::Monitor lock_{"Guards PlatformState globals", true}; + // Guards PlatformState globals + amd::Monitor lock_{true}; // global level lock for unique file descritor map: ufd_map_ - amd::Monitor ufd_lock_{"Unique FD Store Lock", true}; + // Unique FD Store Lock + amd::Monitor ufd_lock_{true}; // Singleton object static PlatformState* platform_; diff --git a/hipamd/src/hiprtc/hiprtcInternal.cpp b/hipamd/src/hiprtc/hiprtcInternal.cpp index d81d930bd6..f2a8e4ea18 100644 --- a/hipamd/src/hiprtc/hiprtcInternal.cpp +++ b/hipamd/src/hiprtc/hiprtcInternal.cpp @@ -306,7 +306,8 @@ bool RTCCompileProgram::transformOptions(std::vector& compile_optio return findIsa(); } -amd::Monitor RTCProgram::lock_("HIPRTC Program", true); +// HIPRTC Program lock +amd::Monitor RTCProgram::lock_(true); bool RTCCompileProgram::compile(const std::vector& options, bool fgpu_rdc) { if (!addSource_impl()) { diff --git a/hipamd/src/hiprtc/hiprtcInternal.hpp b/hipamd/src/hiprtc/hiprtcInternal.hpp index 0a54bfd5f1..ff60746e7b 100644 --- a/hipamd/src/hiprtc/hiprtcInternal.hpp +++ b/hipamd/src/hiprtc/hiprtcInternal.hpp @@ -72,7 +72,8 @@ template inline std::string ToString(T first, Arg } // namespace internal } // namespace hiprtc -static amd::Monitor g_hiprtcInitlock{"hiprtcInit lock"}; +// hiprtcInit lock +static amd::Monitor g_hiprtcInitlock{}; #define HIPRTC_INIT_API_INTERNAL(...) \ amd::Thread* thread = amd::Thread::current(); \ if (!VDI_CHECK_THREAD(thread)) { \ diff --git a/rocclr/device/device.cpp b/rocclr/device/device.cpp index fe59d216de..f8479c3817 100644 --- a/rocclr/device/device.cpp +++ b/rocclr/device/device.cpp @@ -301,7 +301,8 @@ std::vector* Device::devices_ = nullptr; AppProfile Device::appProfile_; Context* Device::glb_ctx_ = nullptr; -Monitor Device::p2p_stage_ops_("P2P Staging Lock", true); +// P2P Staging Lock +Monitor Device::p2p_stage_ops_(true); Memory* Device::p2p_stage_ = nullptr; Monitor MemObjMap::AllocatedLock_ ROCCLR_INIT_PRIORITY(101) ("Guards MemObjMap allocation list"); @@ -714,7 +715,8 @@ bool Device::ValidateHsail() { bool Device::create(const Isa &isa) { assert(!vaCacheAccess_ && !vaCacheMap_); isa_ = &isa; - vaCacheAccess_ = new amd::Monitor("VA Cache Ops Lock", true); + // VA Cache Ops Lock + vaCacheAccess_ = new amd::Monitor(true); if (nullptr == vaCacheAccess_) { return false; } diff --git a/rocclr/device/device.hpp b/rocclr/device/device.hpp index f23a1ab268..c995e5e85e 100644 --- a/rocclr/device/device.hpp +++ b/rocclr/device/device.hpp @@ -1265,7 +1265,7 @@ class VirtualDevice : public amd::HeapObject { VirtualDevice(amd::Device& device) : device_(device) , blitMgr_(NULL) - , execution_("Virtual device execution lock", true) + , execution_(true) /* Virtual device execution lock */ , index_(0) {} //! Destroy this virtual device. @@ -2156,7 +2156,7 @@ class Device : public RuntimeObject { uint64_t stack_size_{1024}; //!< Device stack size device::Memory* initial_heap_buffer_; //!< Initial heap buffer uint64_t initial_heap_size_{HIP_INITIAL_DM_SIZE}; //!< Initial device heap size - amd::Monitor activeQueuesLock_ {"Guards access to the activeQueues set"}; + amd::Monitor activeQueuesLock_ {}; //!< Guards access to the activeQueues set std::unordered_set activeQueues; //!< The set of active queues private: const Isa *isa_; //!< Device isa diff --git a/rocclr/device/devprogram.cpp b/rocclr/device/devprogram.cpp index b8eb9397b2..584774a72f 100644 --- a/rocclr/device/devprogram.cpp +++ b/rocclr/device/devprogram.cpp @@ -69,7 +69,8 @@ inline static std::vector splitSpaceSeparatedString(const char *str } #if defined(WITH_COMPILER_LIB) -amd::Monitor Program::buildLock_("HSAIL build lock", true); +// HSAIL build lock +amd::Monitor Program::buildLock_(true); #endif // ================================================================================================ @@ -2939,7 +2940,8 @@ bool Program::getGlobalVarFromCodeObj(std::vector* var_names) const #endif } -amd::Monitor Program::initFiniLock_("Init Fini Launch Lock", true); +// Init Fini Launch Lock +amd::Monitor Program::initFiniLock_(true); bool Program::runInitFiniKernel(kernel_kind_t kind) const { amd::HostQueue* queue = nullptr; diff --git a/rocclr/device/pal/palblit.cpp b/rocclr/device/pal/palblit.cpp index e70f511268..c39cf0db08 100644 --- a/rocclr/device/pal/palblit.cpp +++ b/rocclr/device/pal/palblit.cpp @@ -659,7 +659,7 @@ KernelBlitManager::KernelBlitManager(VirtualGPU& gpu, Setup setup) : DmaBlitManager(gpu, setup), program_(NULL), xferBufferSize_(0), - lockXferOps_("Transfer Ops Lock", true) { + lockXferOps_(true) /* Transfer Ops Lock */ { for (uint i = 0; i < BlitTotal; ++i) { kernels_[i] = NULL; } diff --git a/rocclr/device/pal/paldevice.cpp b/rocclr/device/pal/paldevice.cpp index e0929d6fb1..f3d4dc8dc8 100644 --- a/rocclr/device/pal/paldevice.cpp +++ b/rocclr/device/pal/paldevice.cpp @@ -803,13 +803,13 @@ Device::ScopedLockVgpus::~ScopedLockVgpus() { Device::Device() : NullDevice(), numOfVgpus_(0), - lockAsyncOps_("Device Async Ops Lock", true), - lockForInitHeap_("Initialization of Heap Resource", true), - lockPAL_("PAL Ops Lock", true), - vgpusAccess_("Virtual GPU List Ops Lock", true), - scratchAlloc_("Scratch Allocation Lock", true), - mapCacheOps_("Map Cache Lock", true), - lockResourceOps_("Resource List Ops Lock", true), + lockAsyncOps_(true), /* Device Async Ops Lock */ + lockForInitHeap_(true), /* Initialization of Heap Resource */ + lockPAL_(true), /* PAL Ops Lock */ + vgpusAccess_(true), /* Virtual GPU List Ops Lock */ + scratchAlloc_(true), /* Scratch Allocation Lock */ + mapCacheOps_(true), /* Map Cache Lock */ + lockResourceOps_(true), /* Resource List Ops Lock */ xferRead_(nullptr), mapCache_(nullptr), resourceCache_(nullptr), diff --git a/rocclr/device/pal/paldevice.hpp b/rocclr/device/pal/paldevice.hpp index 20ee48e7ab..7e5013d979 100644 --- a/rocclr/device/pal/paldevice.hpp +++ b/rocclr/device/pal/paldevice.hpp @@ -259,7 +259,7 @@ class Device : public NullDevice { amd::Monitor queue_lock_; //!< Queue lock for access AqlPacketMgmt aql_packet_mgmt_; //!< AQL packets management class for debugger support QueueRecycleInfo() : counter_(1), engineType_(Pal::EngineTypeCompute), index_(0), - queue_lock_("Queue lock for sharing", true) {} + queue_lock_(true) /* Queue lock for sharing */ {} //! Returns the aql packet list uintptr_t AqlPacketList() const { diff --git a/rocclr/device/pal/palresource.hpp b/rocclr/device/pal/palresource.hpp index b6977bce8d..172b1128d0 100644 --- a/rocclr/device/pal/palresource.hpp +++ b/rocclr/device/pal/palresource.hpp @@ -579,7 +579,7 @@ class ResourceCache : public amd::HeapObject { public: //! Default constructor ResourceCache(Device* device, size_t cacheSizeLimit) - : lockCacheOps_("PAL resource cache", true), + : lockCacheOps_(true), /* PAL resource cache */ cacheSize_(0), lclCacheSize_(0), persistentCacheSize_(0), diff --git a/rocclr/device/rocm/rocblit.cpp b/rocclr/device/rocm/rocblit.cpp index b2b80be3da..132fe7d2fb 100644 --- a/rocclr/device/rocm/rocblit.cpp +++ b/rocclr/device/rocm/rocblit.cpp @@ -872,7 +872,7 @@ KernelBlitManager::KernelBlitManager(VirtualGPU& gpu, Setup setup) : DmaBlitManager(gpu, setup), program_(nullptr), xferBufferSize_(0), - lockXferOps_("Transfer Ops Lock", true) { + lockXferOps_(true) /* Transfer Ops Lock*/ { for (uint i = 0; i < BlitTotal; ++i) { kernels_[i] = nullptr; } diff --git a/rocclr/device/rocm/rocdevice.cpp b/rocclr/device/rocm/rocdevice.cpp index a80d8c6580..ed959d9039 100644 --- a/rocclr/device/rocm/rocdevice.cpp +++ b/rocclr/device/rocm/rocdevice.cpp @@ -181,7 +181,7 @@ Device::Device(hsa_agent_t bkendDevice) , xferRead_(nullptr) , xferWrite_(nullptr) , freeMem_(0) - , vgpusAccess_("Virtual GPU List Ops Lock", true) + , vgpusAccess_(true) /* Virtual GPU List Ops Lock */ , hsa_exclusive_gpu_access_(false) , queuePool_(QueuePriority::Total) , coopHostcallBuffer_(nullptr) @@ -809,7 +809,8 @@ bool Device::create() { return false; } - mapCacheOps_ = new amd::Monitor("Map Cache Lock", true); + // Map Cache Lock + mapCacheOps_ = new amd::Monitor(true); if (nullptr == mapCacheOps_) { return false; } diff --git a/rocclr/device/rocm/rocdevice.hpp b/rocclr/device/rocm/rocdevice.hpp index 4b1b384840..7111fcec14 100644 --- a/rocclr/device/rocm/rocdevice.hpp +++ b/rocclr/device/rocm/rocdevice.hpp @@ -98,7 +98,7 @@ public: ProfilingSignal() : ts_(nullptr) , engine_(HwQueueEngine::Compute) - , lock_("Signal Ops Lock", true) + , lock_(true) /* Signal Ops Lock */ , isPacketDispatch_(false) { signal_.handle = 0; diff --git a/rocclr/device/rocm/rocvirtual.hpp b/rocclr/device/rocm/rocvirtual.hpp index a904e31ace..35b0fe7b05 100644 --- a/rocclr/device/rocm/rocvirtual.hpp +++ b/rocclr/device/rocm/rocvirtual.hpp @@ -124,7 +124,7 @@ class Timestamp : public amd::ReferenceCountedObject { , command_(command) , parsedCommand_(nullptr) , callback_signal_(hsa_signal_t{}) - , lock_("Timestamp lock", true) {} + , lock_(true) /* Timestamp lock */ {} ~Timestamp() {} diff --git a/rocclr/platform/memory.cpp b/rocclr/platform/memory.cpp index 948067dcbb..97cbac1fe3 100644 --- a/rocclr/platform/memory.cpp +++ b/rocclr/platform/memory.cpp @@ -96,7 +96,7 @@ Memory::Memory(Context& context, Type type, Flags flags, size_t size, void* svmP svmHostAddress_(svmPtr), resOffset_(0), flagsEx_(0), - lockMemoryOps_("Memory Ops Lock", true) { + lockMemoryOps_(true) /* Memory Ops Lock */ { svmPtrCommited_ = (flags & CL_MEM_SVM_FINE_GRAIN_BUFFER) ? true : false; canBeCached_ = true; } @@ -120,7 +120,7 @@ Memory::Memory(Memory& parent, Flags flags, size_t origin, size_t size, Type typ svmHostAddress_(parent.getSvmPtr()), resOffset_(0), flagsEx_(0), - lockMemoryOps_("Memory Ops Lock", true) { + lockMemoryOps_(true) /* Memory Ops Lock */ { svmPtrCommited_ = parent.isSvmPtrCommited(); canBeCached_ = true; parent_->retain(); diff --git a/rocclr/platform/object.hpp b/rocclr/platform/object.hpp index c55225be27..3d9348570e 100644 --- a/rocclr/platform/object.hpp +++ b/rocclr/platform/object.hpp @@ -195,7 +195,7 @@ struct Coord3D { template class SysmemPool { public: - SysmemPool(): chunk_access_("Sysmem Pool Lock", true) {} + SysmemPool(): chunk_access_(true) /* Sysmem Pool Lock */ {} ~SysmemPool() { // Release current chunk if (chunks_.size() == 1) { diff --git a/rocclr/platform/program.hpp b/rocclr/platform/program.hpp index e6914575ce..2e15d2fa13 100644 --- a/rocclr/platform/program.hpp +++ b/rocclr/platform/program.hpp @@ -137,7 +137,7 @@ class Program : public RuntimeObject { language_(language), symbolTable_(NULL), programLog_(), - programLock_("Program lock", true) { + programLock_(true) /* Program lock */ { for (auto i = 0; i != numHeaders; ++i) { headers_.emplace_back(headers[i]); headerNames_.emplace_back(headerNames[i]); @@ -148,7 +148,7 @@ class Program : public RuntimeObject { Program(Context& context, Language language = Binary) : context_(context), language_(language), symbolTable_(NULL), - programLock_("Program lock", true) {} + programLock_(true) /* Program lock */ {} //! Returns context, associated with the current program. const Context& context() const { return context_(); } diff --git a/rocclr/thread/monitor.cpp b/rocclr/thread/monitor.cpp index 159ea1f19a..d9ec847aae 100644 --- a/rocclr/thread/monitor.cpp +++ b/rocclr/thread/monitor.cpp @@ -33,17 +33,8 @@ MonitorBase::~MonitorBase() {} namespace legacy_monitor { -Monitor::Monitor(const char* name, bool recursive) - : contendersList_(0), onDeck_(0), waitersList_(NULL), owner_(NULL), recursive_(recursive) { - if (name == NULL) { - const char unknownName[] = "@unknown@"; - assert(sizeof(unknownName) < sizeof(name_) && "just checking"); - ::strncpy(name_, unknownName, sizeof(name_) - 1); - } else { - ::strncpy(name_, name, sizeof(name_) - 1); - } - name_[sizeof(name_) - 1] = '\0'; -} +Monitor::Monitor(bool recursive) + : contendersList_(0), onDeck_(0), waitersList_(NULL), owner_(NULL), recursive_(recursive) {} bool Monitor::trySpinLock() { if (tryLock()) { diff --git a/rocclr/thread/monitor.hpp b/rocclr/thread/monitor.hpp index f778849689..bf4080d21d 100644 --- a/rocclr/thread/monitor.hpp +++ b/rocclr/thread/monitor.hpp @@ -80,7 +80,6 @@ public: virtual void wait() = 0; virtual void notify() = 0; virtual void notifyAll() = 0; - virtual const char* name() const = 0; }; namespace legacy_monitor { @@ -97,8 +96,6 @@ class Monitor final: public HeapObject, public MonitorBase { * and main lock. */ std::atomic_intptr_t contendersList_; - //! The Mutex's name - char name_[64]; //! Semaphore of the next thread to contend for the lock. std::atomic_intptr_t onDeck_; @@ -135,7 +132,7 @@ class Monitor final: public HeapObject, public MonitorBase { void setOwner(Thread* thread) { owner_ = thread; } public: - explicit Monitor(const char* name = NULL, bool recursive = false); + explicit Monitor(bool recursive = false); ~Monitor() {} //! Try to acquire the lock, return true if successful. @@ -165,9 +162,6 @@ class Monitor final: public HeapObject, public MonitorBase { * \note The monitor must be owned before calling notifyAll(). */ void notifyAll(); - - //! Return this lock's name. - const char* name() const { return name_; } }; @@ -176,17 +170,8 @@ class Monitor final: public HeapObject, public MonitorBase { namespace mutex_monitor { class Monitor final: public HeapObject, public MonitorBase { public: - explicit Monitor(const char* name = nullptr, bool recursive = false) + explicit Monitor(bool recursive = false) : recursive_(recursive) { - if (name == NULL) { - const char unknownName[] = "@unknown@"; - assert(sizeof(unknownName) < sizeof(name_) && "just checking"); - ::strncpy(name_, unknownName, sizeof(name_) - 1); - } else { - ::strncpy(name_, name, sizeof(name_) - 1); - } - name_[sizeof(name_) - 1] = '\0'; - if (recursive) new (&rec_mutex_) std::recursive_mutex(); else @@ -244,16 +229,12 @@ class Monitor final: public HeapObject, public MonitorBase { */ void notifyAll() { cv_.notify_all(); } - //! Return this lock's name. - const char* name() const { return name_; } - private: union { std::mutex mutex_; std::recursive_mutex rec_mutex_; }; std::condition_variable cv_; //!< The condition variable for sync on the mutex - char name_[64]; //!< The mutex's name const bool recursive_; //!< True if this is a recursive mutex, false otherwise. }; } // namespace mutex_monitor @@ -261,12 +242,12 @@ class Monitor final: public HeapObject, public MonitorBase { // Monitor API wrapper to user class Monitor { public: - explicit Monitor(const char* name = nullptr, bool recursive = false) { + explicit Monitor(bool recursive = false) { if (DEBUG_CLR_USE_STDMUTEX_IN_AMD_MONITOR) { - monitor_ = new mutex_monitor::Monitor(name, recursive); + monitor_ = new mutex_monitor::Monitor(recursive); } else { - monitor_ = new legacy_monitor::Monitor(name, recursive); + monitor_ = new legacy_monitor::Monitor(recursive); } } inline ~Monitor() { delete monitor_; }; @@ -276,7 +257,6 @@ public: inline void wait() { monitor_->wait(); } inline void notify() { monitor_->notify(); } inline void notifyAll() { monitor_->notifyAll(); } - inline const char* name() { return monitor_->name(); } private: MonitorBase* monitor_;