ATLAS Offline Software
|
Workaround for ROOT TClassTable locking problem. More...
Public Member Functions | |
DsoRootLock () | |
Constructor. More... | |
Static Public Member Functions | |
static int | hook (const ath_dso_event *event, void *userdata) |
Acquire the ROOT core lock during library loading. More... | |
Workaround for ROOT TClassTable locking problem.
TClassTable is an internal ROOT structure used to hold information about all classes known to ROOT, whether or not full dictionary information has been built. This is effectively a singleton; however, TClassTable itself contains no locking. Rather, it relies on the caller already having acquired the ROOT core mutex. In most cases, that happens. However, when a shared object containing ROOT dictionaries is loaded, calls are made to TClassTable to record the classes present in that dictionary. But, in that case, the core mutex is not acquired, resulting in a potential race.
This would be best addressed inside ROOT, by acquiring the lock in TGenericClassInfo::Init. As a temporary workaround, however, use the existing DSO hooks to acquire the root lock around all shared library loads.
Definition at line 35 of file DsoRootLock.cxx.
DsoRootLock::DsoRootLock | ( | ) |
|
static |