introduce a TGlobalMutexGuard class where the dtor sets the gGlobalMutex to 0. Create a global static TGlobalMutexGuard object which will cause the TGlobalMutexGuard dtor to be called when libThread is unloaded (at the end of a ROOT program). This fixes problems with ROOT crashing at exit because gGlobalMutex was not 0 and still accessed while the Thread library was already unloaded.
introduce a TGlobalMutexGuard class where the dtor sets the gGlobalMutex
to 0. Create a global static TGlobalMutexGuard object which will cause
the TGlobalMutexGuard dtor to be called when libThread is unloaded (at the
end of a ROOT program). This fixes problems with ROOT crashing at exit
because gGlobalMutex was not 0 and still accessed while the Thread library
was already unloaded.


git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@14988 27541ba8-7e3a-0410-8455-c3a389f83636

dfunke/root,zzxuanyuan/root,sbinet/cxx-root,veprbl/root,sbinet/cxx-root,jrtomps/root,BerserkerTroll/root,arch1tect0r/root,evgeny-boger/root,esakellari/my_root_for_test,satyarth934/root,sawenzel/root,perovic/root,zzxuanyuan/root-compressor-dummy,evgeny-boger/root,jrtomps/root,zzxuanyuan/root,georgtroska/root,davidlt/root,0x0all/ROOT,gbitzes/root,vukasinmilosevic/root,satyarth934/root,0x0all/ROOT,gbitzes/root,lgiommi/root,lgiommi/root,BerserkerTroll/root,veprbl/root,smarinac/root,zzxuanyuan/root-compressor-dummy,omazapa/root-old,alexschlueter/cern-root,zzxuanyuan/root,Y--/root,sirinath/root,buuck/root,omazapa/root,perovic/root,agarciamontoro/root,smarinac/root,tc3t/qoot,georgtroska/root,esakellari/root,alexschlueter/cern-root,evgeny-boger/root,dfunke/root,simonpf/root,karies/root,Dr15Jones/root,nilqed/root,thomaskeck/root,agarciamontoro/root,arch1tect0r/root,krafczyk/root,Duraznos/root,esakellari/my_root_for_test,georgtroska/root,simonpf/root,beniz/root,omazapa/root,thomaskeck/root,arch1tect0r/root,kirbyherm/root-r-tools,cxx-hep/root-cern,evgeny-boger/root,pspe/root,ffurano/root5,lgiommi/root,CristinaCristescu/root,BerserkerTroll/root,veprbl/root,tc3t/qoot,ffurano/root5,sbinet/cxx-root,jrtomps/root,dfunke/root,pspe/root,krafczyk/root,Duraznos/root,root-mirror/root,olifre/root,satyarth934/root,sirinath/root,0x0all/ROOT,olifre/root,gbitzes/root,davidlt/root,gganis/root,gbitzes/root,Y--/root,simonpf/root,omazapa/root-old,esakellari/my_root_for_test,sawenzel/root,krafczyk/root,davidlt/root,omazapa/root,abhinavmoudgil95/root,davidlt/root,Duraznos/root,esakellari/root,olifre/root,agarciamontoro/root,evgeny-boger/root,buuck/root,pspe/root,krafczyk/root,davidlt/root,krafczyk/root,Y--/root,arch1tect0r/root,bbockelm/root,Dr15Jones/root,cxx-hep/root-cern,gbitzes/root,beniz/root,dfunke/root,Duraznos/root,cxx-hep/root-cern,alexschlueter/cern-root,veprbl/root,zzxuanyuan/root,kirbyherm/root-r-tools,veprbl/root,Y--/root,zzxuanyuan/root-compressor-dummy,perovic/root,esakellari/root,BerserkerTroll/root,omazapa/root,sbinet/cxx-root,davidlt/root,CristinaCristescu/root,smarinac/root,satyarth934/root,mhuwiler/rootauto,simonpf/root,mhuwiler/rootauto,sbinet/cxx-root,vukasinmilosevic/root,omazapa/root-old,Duraznos/root,georgtroska/root,beniz/root,bbockelm/root,esakellari/my_root_for_test,strykejern/TTreeReader,buuck/root,abhinavmoudgil95/root,simonpf/root,satyarth934/root,Duraznos/root,omazapa/root-old,mhuwiler/rootauto,Duraznos/root,mattkretz/root,abhinavmoudgil95/root,Y--/root,abhinavmoudgil95/root,davidlt/root,jrtomps/root,mattkretz/root,vukasinmilosevic/root,gbitzes/root,omazapa/root-old,perovic/root,smarinac/root,cxx-hep/root-cern,karies/root,agarciamontoro/root,pspe/root,esakellari/root,lgiommi/root,ffurano/root5,CristinaCristescu/root,sawenzel/root,karies/root,BerserkerTroll/root,simonpf/root,bbockelm/root,omazapa/root-old,mkret2/root,nilqed/root,Dr15Jones/root,gganis/root,Dr15Jones/root,mhuwiler/rootauto,BerserkerTroll/root,zzxuanyuan/root-compressor-dummy,zzxuanyuan/root-compressor-dummy,sbinet/cxx-root,vukasinmilosevic/root,davidlt/root,bbockelm/root,thomaskeck/root,karies/root,cxx-hep/root-cern,smarinac/root,gganis/root,lgiommi/root,sawenzel/root,nilqed/root,alexschlueter/cern-root,mkret2/root,tc3t/qoot,zzxuanyuan/root,gganis/root,sirinath/root,simonpf/root,mhuwiler/rootauto,mkret2/root,nilqed/root,perovic/root,abhinavmoudgil95/root,arch1tect0r/root,BerserkerTroll/root,zzxuanyuan/root-compressor-dummy,kirbyherm/root-r-tools,omazapa/root,nilqed/root,mhuwiler/rootauto,olifre/root,gbitzes/root,zzxuanyuan/root,georgtroska/root,gbitzes/root,mattkretz/root,Dr15Jones/root,kirbyherm/root-r-tools,zzxuanyuan/root,omazapa/root-old,mattkretz/root,lgiommi/root,esakellari/root,omazapa/root-old,jrtomps/root,strykejern/TTreeReader,davidlt/root,georgtroska/root,esakellari/my_root_for_test,abhinavmoudgil95/root,mattkretz/root,root-mirror/root,olifre/root,esakellari/my_root_for_test,jrtomps/root,vukasinmilosevic/root,omazapa/root,mattkretz/root,ffurano/root5,zzxuanyuan/root,0x0all/ROOT,gbitzes/root,mattkretz/root,agarciamontoro/root,beniz/root,dfunke/root,perovic/root,mkret2/root,perovic/root,veprbl/root,thomaskeck/root,agarciamontoro/root,ffurano/root5,agarciamontoro/root,mkret2/root,cxx-hep/root-cern,bbockelm/root,evgeny-boger/root,kirbyherm/root-r-tools,bbockelm/root,davidlt/root,karies/root,root-mirror/root,bbockelm/root,evgeny-boger/root,smarinac/root,perovic/root,sbinet/cxx-root,karies/root,buuck/root,bbockelm/root,sirinath/root,beniz/root,sirinath/root,agarciamontoro/root,0x0all/ROOT,jrtomps/root,omazapa/root,strykejern/TTreeReader,satyarth934/root,CristinaCristescu/root,omazapa/root,sawenzel/root,arch1tect0r/root,krafczyk/root,mhuwiler/rootauto,zzxuanyuan/root-compressor-dummy,strykejern/TTreeReader,zzxuanyuan/root,sbinet/cxx-root,mkret2/root,Duraznos/root,dfunke/root,beniz/root,buuck/root,mattkretz/root,pspe/root,CristinaCristescu/root,nilqed/root,omazapa/root,olifre/root,0x0all/ROOT,esakellari/root,root-mirror/root,simonpf/root,mattkretz/root,perovic/root,Duraznos/root,lgiommi/root,mkret2/root,sawenzel/root,Y--/root,jrtomps/root,CristinaCristescu/root,ffurano/root5,Duraznos/root,vukasinmilosevic/root,ffurano/root5,krafczyk/root,root-mirror/root,jrtomps/root,perovic/root,arch1tect0r/root,sawenzel/root,sawenzel/root,cxx-hep/root-cern,CristinaCristescu/root,tc3t/qoot,agarciamontoro/root,tc3t/qoot,mhuwiler/rootauto,smarinac/root,CristinaCristescu/root,krafczyk/root,sirinath/root,beniz/root,esakellari/root,esakellari/my_root_for_test,arch1tect0r/root,cxx-hep/root-cern,mattkretz/root,lgiommi/root,BerserkerTroll/root,zzxuanyuan/root-compressor-dummy,omazapa/root-old,agarciamontoro/root,thomaskeck/root,vukasinmilosevic/root,lgiommi/root,mhuwiler/rootauto,abhinavmoudgil95/root,Dr15Jones/root,krafczyk/root,krafczyk/root,buuck/root,nilqed/root,thomaskeck/root,sawenzel/root,lgiommi/root,nilqed/root,bbockelm/root,pspe/root,abhinavmoudgil95/root,sbinet/cxx-root,kirbyherm/root-r-tools,vukasinmilosevic/root,0x0all/ROOT,mkret2/root,arch1tect0r/root,dfunke/root,olifre/root,omazapa/root-old,zzxuanyuan/root-compressor-dummy,sawenzel/root,pspe/root,sirinath/root,nilqed/root,buuck/root,smarinac/root,Duraznos/root,0x0all/ROOT,tc3t/qoot,zzxuanyuan/root,georgtroska/root,root-mirror/root,gganis/root,jrtomps/root,mattkretz/root,tc3t/qoot,tc3t/qoot,BerserkerTroll/root,Y--/root,olifre/root,krafczyk/root,veprbl/root,BerserkerTroll/root,gganis/root,veprbl/root,esakellari/root,beniz/root,arch1tect0r/root,Dr15Jones/root,sirinath/root,veprbl/root,pspe/root,evgeny-boger/root,mhuwiler/rootauto,gganis/root,smarinac/root,veprbl/root,esakellari/my_root_for_test,beniz/root,satyarth934/root,evgeny-boger/root,jrtomps/root,root-mirror/root,karies/root,arch1tect0r/root,thomaskeck/root,vukasinmilosevic/root,Y--/root,buuck/root,strykejern/TTreeReader,olifre/root,karies/root,zzxuanyuan/root,thomaskeck/root,buuck/root,satyarth934/root,veprbl/root,dfunke/root,abhinavmoudgil95/root,abhinavmoudgil95/root,dfunke/root,karies/root,georgtroska/root,sirinath/root,mhuwiler/rootauto,simonpf/root,pspe/root,esakellari/root,georgtroska/root,root-mirror/root,root-mirror/root,gbitzes/root,mkret2/root,zzxuanyuan/root-compressor-dummy,alexschlueter/cern-root,0x0all/ROOT,sawenzel/root,nilqed/root,lgiommi/root,zzxuanyuan/root-compressor-dummy,pspe/root,buuck/root,strykejern/TTreeReader,esakellari/my_root_for_test,simonpf/root,simonpf/root,mkret2/root,Y--/root,satyarth934/root,alexschlueter/cern-root,olifre/root,CristinaCristescu/root,satyarth934/root,mkret2/root,omazapa/root,evgeny-boger/root,nilqed/root,sbinet/cxx-root,CristinaCristescu/root,dfunke/root,omazapa/root-old,esakellari/root,olifre/root,dfunke/root,gbitzes/root,thomaskeck/root,pspe/root,georgtroska/root,gganis/root,karies/root,Y--/root,alexschlueter/cern-root,karies/root,omazapa/root,gganis/root,beniz/root,buuck/root,sirinath/root,beniz/root,root-mirror/root,perovic/root,Y--/root,esakellari/my_root_for_test,abhinavmoudgil95/root,agarciamontoro/root,zzxuanyuan/root,CristinaCristescu/root,gganis/root,strykejern/TTreeReader,bbockelm/root,evgeny-boger/root,BerserkerTroll/root,vukasinmilosevic/root,kirbyherm/root-r-tools,smarinac/root,esakellari/root,bbockelm/root,sirinath/root,davidlt/root,satyarth934/root,georgtroska/root,thomaskeck/root,gganis/root,tc3t/qoot,vukasinmilosevic/root,root-mirror/root,sbinet/cxx-root,tc3t/qoot