search for: smartrwmutex

Displaying 3 results from an estimated 3 matches for "smartrwmutex".

Did you mean: smartmutex
2014 Jun 01
3
[LLVMdev] PassRegistry thread safety and ManagedStatic interaction
...:getPassRegistry()->registerPass(*this); Note that PassRegistry, however, is a ManagedStatic. So the call to getPassRegistry() creates the backing object of the ManagedStatic here. Then registerPass gets called, which attempts to lock the mutex. This will initialize the backing object of the SmartRWMutex. During shutdown, it happens in reverse order. First the SmartRWMutex is destroyed, then the PassRegistry is destroyed. During the PassRegistry's destructor, it attempts to lock the mutex again. This works in the current code because ManagedStatic "accidentally" allocates another...
2014 Jun 02
2
[LLVMdev] PassRegistry thread safety and ManagedStatic interaction
...> > Note that PassRegistry, however, is a ManagedStatic. So the call to > > getPassRegistry() creates the backing object of the ManagedStatic here. > > Then registerPass gets called, which attempts to lock the mutex. This > will > > initialize the backing object of the SmartRWMutex. > > > > During shutdown, it happens in reverse order. First the SmartRWMutex is > > destroyed, then the PassRegistry is destroyed. During the PassRegistry's > > destructor, it attempts to lock the mutex again. This works in the > current > > code because Man...
2014 Jun 02
2
[LLVMdev] PassRegistry thread safety and ManagedStatic interaction
...a ManagedStatic. So the call to > >> > getPassRegistry() creates the backing object of the ManagedStatic > here. > >> > Then registerPass gets called, which attempts to lock the mutex. This > >> > will > >> > initialize the backing object of the SmartRWMutex. > >> > > >> > During shutdown, it happens in reverse order. First the SmartRWMutex > is > >> > destroyed, then the PassRegistry is destroyed. During the > >> > PassRegistry's > >> > destructor, it attempts to lock the mutex again...