Do not use the user accessible 'global' lock to protect the internals of TThread, instead use an internal (but still global) mutex.
Do not use the user accessible 'global' lock to protect the internals of TThread,
instead use an internal (but still global) mutex.

Having the ambiguity leads to an easy uncesserary dead-lock.

Thread1:
  1. Acquire TThread::Lock
  2. TFile::Open
   3. TClass::GetClass()
      7. TClass::Init
       8. wait for gCINTGlobalMutex

Thread2:
  3. TFile::Open
   4. TClass::GetClass()
    5. TClass::init 
     6. Acquire gCINTGlobalMutex
        9. TNamed::SetName
        10. use gPad
         11. call TThread::Tsd
          12. call TThread::Self
           13. wait for ever and ever on TThread::Lock ....


git-svn-id: ecbadac9c76e8cf640a0bca86f6bd796c98521e3@41108 27541ba8-7e3a-0410-8455-c3a389f83636

dawehner/root,dawehner/root,dawehner/root,dawehner/root,dawehner/root,dawehner/root,dawehner/root,dawehner/root