forked from cms-sw/cmsdist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
0001-Use-meta-data-mutex-for-the-proxy-initialization.patch
61 lines (49 loc) · 2.07 KB
/
0001-Use-meta-data-mutex-for-the-proxy-initialization.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
From ba443df888664becb07009f785ae5c94c0171ffa Mon Sep 17 00:00:00 2001
From: David Abdurachmanov <[email protected]>
Date: Tue, 22 Oct 2013 14:14:31 +0200
Subject: [PATCH 1/2] Use meta-data mutex for the proxy initialization.
This avoid nesting the collection and the meta-data mutex.
Backport: 0c40533fe73f8312944ae0f2636ede51b2a33cfb
Signed-off-by: David Abdurachmanov <[email protected]>
---
io/io/src/TEmulatedCollectionProxy.cxx | 3 ++-
io/io/src/TGenCollectionProxy.cxx | 4 +++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/io/io/src/TEmulatedCollectionProxy.cxx b/io/io/src/TEmulatedCollectionProxy.cxx
index 0eb85d6..d6e3acf 100644
--- a/io/io/src/TEmulatedCollectionProxy.cxx
+++ b/io/io/src/TEmulatedCollectionProxy.cxx
@@ -32,6 +32,7 @@
#include "Riostream.h"
#include "TVirtualMutex.h" // For R__LOCKGUARD
+#include "TInterpreter.h" // For gCINTMutex
//
// Utility function to allow the creation of a TClass for a std::pair without
@@ -110,7 +111,7 @@ void TEmulatedCollectionProxy::DeleteArray(void* p, Bool_t dtorOnly) const
TGenCollectionProxy *TEmulatedCollectionProxy::InitializeEx(Bool_t silent)
{
// Proxy initializer
- R__LOCKGUARD2(gCollectionMutex);
+ R__LOCKGUARD2(gCINTMutex);
if (fClass) return this;
diff --git a/io/io/src/TGenCollectionProxy.cxx b/io/io/src/TGenCollectionProxy.cxx
index 4c2a9fa..44009e4 100644
--- a/io/io/src/TGenCollectionProxy.cxx
+++ b/io/io/src/TGenCollectionProxy.cxx
@@ -36,6 +36,8 @@
#include "TStreamerInfoActions.h"
#include <stdlib.h>
+#include "TInterpreter.h" // For gCINTMutex
+
#define MESSAGE(which,text)
std::vector<TVirtualCollectionProxy*> gSlowIterator__Proxy;
@@ -771,7 +773,7 @@ static TGenCollectionProxy::Value *R__CreateValue(const std::string &name, Bool_
TGenCollectionProxy *TGenCollectionProxy::InitializeEx(Bool_t silent)
{
// Proxy initializer
- R__LOCKGUARD2(gCollectionMutex);
+ R__LOCKGUARD2(gCINTMutex);
if (fValue) return this;
TClass *cl = fClass ? fClass.GetClass() : TClass::GetClass(fTypeinfo,kTRUE,silent);
--
1.7.4.1