Skip to content
Snippets Groups Projects
Commit 6e37f631 authored by Steven Murray's avatar Steven Murray
Browse files

cta/CTA#130 Helgrind gets spurious when using `std::mutex` in the catalogue.

With respect to the rdbms::OcciStmt class. Replaced
std::mutex and std::lock_guard with their helgrind friendly
drop in replacements threading::Mutex and
threading::MutexLocker.
parent 84922485
Branches
Tags
No related merge requests found
......@@ -18,6 +18,7 @@
#include "common/exception/Exception.hpp"
#include "common/make_unique.hpp"
#include "common/threading/MutexLocker.hpp"
#include "rdbms/OcciColumn.hpp"
#include "rdbms/OcciConn.hpp"
#include "rdbms/OcciRset.hpp"
......@@ -83,7 +84,7 @@ OcciStmt::~OcciStmt() throw() {
//------------------------------------------------------------------------------
void OcciStmt::close() {
try {
std::lock_guard<std::mutex> lock(m_mutex);
threading::MutexLocker locker(m_mutex);
if (nullptr != m_stmt) {
m_conn.closeStmt(m_stmt);
......
......@@ -18,10 +18,10 @@
#pragma once
#include "common/threading/Mutex.hpp"
#include "rdbms/Stmt.hpp"
#include <memory>
#include <mutex>
#include <occi.h>
#include <stdint.h>
......@@ -164,7 +164,7 @@ private:
/**
* Mutex used to serialize access to this object.
*/
std::mutex m_mutex;
threading::Mutex m_mutex;
/**
* The database connection.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment