Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
Related Functions
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
v
w
x
z
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
v
w
x
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
GitLab
LXR
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Control
RootUtils
src
DsoRootLock.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
12
#include "
CxxUtils/AthDsoCbk.h
"
13
#include "
CxxUtils/checker_macros.h
"
14
#include "TVirtualRWMutex.h"
15
16
35
class
DsoRootLock
36
{
37
public
:
41
DsoRootLock
();
42
43
47
static
int
hook
(
const
ath_dso_event
*
event
,
void
* userdata);
48
};
49
50
54
DsoRootLock::DsoRootLock
()
55
{
56
ath_dso_cbk_register
(
hook
,
nullptr
);
57
}
58
59
63
int
DsoRootLock::hook
(
const
ath_dso_event
*
event
,
void
*
/*userdata*/
)
64
{
65
// Skip for Xrd libraries --- otherwise we can deadlock.
66
if
(
event
->fname && strncmp (
event
->fname,
"libXrd"
, 6) == 0)
return
0;
67
68
// If the core mutex has been created, acquire it before loading
69
// a library and release it on completion.
70
// Hope these are always properly nested!
71
ROOT::TVirtualRWMutex*
m
ATLAS_THREAD_SAFE
= ROOT::gCoreMutex;
72
if
(
m
) {
73
if
(
event
->step == 0) {
74
m
->WriteLock();
75
}
76
else
if
(
event
->step == 1)
77
{
78
m
->WriteUnLock(
nullptr
);
79
}
80
}
81
return
0;
82
}
83
84
86
const
DsoRootLock
dsoRootLock
;
DsoRootLock::DsoRootLock
DsoRootLock()
Constructor.
Definition:
DsoRootLock.cxx:54
DsoRootLock::hook
static int hook(const ath_dso_event *event, void *userdata)
Acquire the ROOT core lock during library loading.
Definition:
DsoRootLock.cxx:63
dsoRootLock
const DsoRootLock dsoRootLock
Set up this hook when this library gets loaded.
Definition:
DsoRootLock.cxx:86
AthDsoCbk.h
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
ath_dso_cbk_register
int ath_dso_cbk_register(ath_dso_event_cbk_t cbk, void *userdata)
ath_dso_event
-*- C -*- AthDsoCbk.h Header file for the dso callbacks api Author: S.Binetbinet@cern....
Definition:
AthDsoCbk.h:22
ATLAS_THREAD_SAFE
#define ATLAS_THREAD_SAFE
Definition:
checker_macros.h:211
DsoRootLock
Workaround for ROOT TClassTable locking problem.
Definition:
DsoRootLock.cxx:36
checker_macros.h
Define macros for attributes used to control the static checker.
python.SystemOfUnits.m
float m
Definition:
SystemOfUnits.py:105
Generated on Thu May 8 2025 21:08:45 for ATLAS Offline Software by
1.8.18