DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
DDCore
include
DD4hep
Mutex.h
Go to the documentation of this file.
1
//==========================================================================
2
// AIDA Detector description implementation
3
//--------------------------------------------------------------------------
4
// Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5
// All rights reserved.
6
//
7
// For the licensing terms see $DD4hepINSTALL/LICENSE.
8
// For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9
//
10
// Author : M.Frank
11
//
12
//==========================================================================
13
14
#ifndef DD4HEP_MUTEX_H
15
#define DD4HEP_MUTEX_H
16
17
// C/C++ include files
18
#if __cplusplus >= 201103L
19
#include <mutex>
20
#endif
21
23
namespace
dd4hep
{
24
#if __cplusplus >= 201103L
25
typedef
std::recursive_mutex dd4hep_mutex_t;
26
typedef
std::lock_guard<dd4hep_mutex_t> dd4hep_lock_t;
27
#else
28
30
struct
dd4hep_mutex_t
{
32
dd4hep_mutex_t
() {}
34
~dd4hep_mutex_t
() {}
36
int
lock
() {
return
0;}
38
int
trylock
() {
return
0;}
40
int
unlock
() {
return
0;}
41
};
43
struct
dd4hep_lock_t
{
45
dd4hep_lock_t
(
dd4hep_mutex_t
&,
bool
=
true
) {}
47
~dd4hep_lock_t
() {}
48
};
49
#endif
50
}
51
#endif // DD4HEP_MUTEX_H
dd4hep::dd4hep_mutex_t::dd4hep_mutex_t
dd4hep_mutex_t()
Default constructor.
Definition:
Mutex.h:32
dd4hep::dd4hep_lock_t::dd4hep_lock_t
dd4hep_lock_t(dd4hep_mutex_t &, bool=true)
Default constructor.
Definition:
Mutex.h:45
dd4hep::dd4hep_mutex_t::trylock
int trylock()
Dummy interface method.
Definition:
Mutex.h:38
dd4hep::dd4hep_lock_t::~dd4hep_lock_t
~dd4hep_lock_t()
Default destructor.
Definition:
Mutex.h:47
dd4hep::dd4hep_mutex_t
Do-nothing compatibility std::unique_ptr emulation for cxx-98.
Definition:
Mutex.h:30
dd4hep::dd4hep_mutex_t::~dd4hep_mutex_t
~dd4hep_mutex_t()
Default destructor.
Definition:
Mutex.h:34
dd4hep::dd4hep_lock_t
Do-nothing compatibility std::unique_ptr emulation for cxx-98.
Definition:
Mutex.h:43
dd4hep::dd4hep_mutex_t::unlock
int unlock()
Dummy interface method.
Definition:
Mutex.h:40
dd4hep::dd4hep_mutex_t::lock
int lock()
Dummy interface method.
Definition:
Mutex.h:36
dd4hep
Namespace for the AIDA detector description toolkit.
Definition:
AlignmentsCalib.h:28
Generated on Thu Jan 9 2025 17:18:03 for DD4hep by
1.8.18