aboutsummaryrefslogtreecommitdiff
path: root/src/core/utils/logging/LoggerRegistry.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/utils/logging/LoggerRegistry.cpp')
-rw-r--r--src/core/utils/logging/LoggerRegistry.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/utils/logging/LoggerRegistry.cpp b/src/core/utils/logging/LoggerRegistry.cpp
index 055e770c7..fe71902ec 100644
--- a/src/core/utils/logging/LoggerRegistry.cpp
+++ b/src/core/utils/logging/LoggerRegistry.cpp
@@ -24,6 +24,7 @@
#include "arm_compute/core/utils/logging/LoggerRegistry.h"
#include "arm_compute/core/Error.h"
+#include "support/Mutex.h"
#include "support/ToolchainSupport.h"
using namespace arm_compute::logging;
@@ -44,7 +45,7 @@ LoggerRegistry &LoggerRegistry::get()
void LoggerRegistry::create_logger(const std::string &name, LogLevel log_level, const std::vector<std::shared_ptr<Printer>> &printers)
{
- std::lock_guard<arm_compute::Mutex> lock(_mtx);
+ arm_compute::lock_guard<arm_compute::Mutex> lock(_mtx);
if((_loggers.find(name) == _loggers.end()) && (_reserved_loggers.find(name) == _reserved_loggers.end()))
{
_loggers[name] = std::make_shared<Logger>(name, log_level, printers);
@@ -53,7 +54,7 @@ void LoggerRegistry::create_logger(const std::string &name, LogLevel log_level,
void LoggerRegistry::remove_logger(const std::string &name)
{
- std::lock_guard<arm_compute::Mutex> lock(_mtx);
+ arm_compute::lock_guard<arm_compute::Mutex> lock(_mtx);
if(_loggers.find(name) != _loggers.end())
{
_loggers.erase(name);
@@ -62,13 +63,13 @@ void LoggerRegistry::remove_logger(const std::string &name)
std::shared_ptr<Logger> LoggerRegistry::logger(const std::string &name)
{
- std::lock_guard<arm_compute::Mutex> lock(_mtx);
+ arm_compute::lock_guard<arm_compute::Mutex> lock(_mtx);
return (_loggers.find(name) != _loggers.end()) ? _loggers[name] : nullptr;
}
void LoggerRegistry::create_reserved_loggers(LogLevel log_level, const std::vector<std::shared_ptr<Printer>> &printers)
{
- std::lock_guard<arm_compute::Mutex> lock(_mtx);
+ arm_compute::lock_guard<arm_compute::Mutex> lock(_mtx);
for(const auto &r : _reserved_loggers)
{
if(_loggers.find(r) == _loggers.end())