Skip to content
Snippets Groups Projects
Commit 84922485 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::OcciRset class.  Replaced
std::mutex and std::lock_guard with their helgrind friendly
drop in replacements threading::Mutex and
threading::MutexLocker.
parent b240e06d
No related branches found
No related tags found
No related merge requests found
......@@ -117,7 +117,7 @@ bool OcciRset::columnIsNull(const std::string &colName) const {
// close
//------------------------------------------------------------------------------
void OcciRset::close() {
std::lock_guard<std::mutex> lock(m_mutex);
threading::Mutex locker(m_mutex);
if(nullptr != m_rset) {
m_stmt->closeResultSet(m_rset);
......@@ -150,7 +150,7 @@ optional<std::string> OcciRset::columnOptionalString(const std::string &colName)
//------------------------------------------------------------------------------
optional<uint64_t> OcciRset::columnOptionalUint64(const std::string &colName) const {
try {
std::lock_guard<std::mutex> lock(m_mutex);
threading::Mutex locker(m_mutex);
const int colIdx = m_colNameToIdx.getIdx(colName);
const std::string stringValue = m_rset->getString(colIdx);
......
......@@ -18,11 +18,11 @@
#pragma once
#include "ColumnNameToIdx.hpp"
#include "Rset.hpp"
#include "common/threading/Mutex.hpp"
#include "rdbms/ColumnNameToIdx.hpp"
#include "rdbms/Rset.hpp"
#include <memory>
#include <mutex>
#include <occi.h>
namespace cta {
......@@ -104,7 +104,7 @@ private:
/**
* Mutex used to serialize access to this object.
*/
mutable std::mutex m_mutex;
mutable threading::Mutex m_mutex;
/**
* The OCCI statement.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment