Просмотр исходного кода

TypeRegistry requires a reentrant mutex

David Rose 18 лет назад
Родитель
Сommit
9ada65e1d4

+ 2 - 2
dtool/src/dtoolbase/typeRegistry.I

@@ -39,7 +39,7 @@ freshen_derivations() {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 INLINE void TypeRegistry::
 INLINE void TypeRegistry::
 init_lock() {
 init_lock() {
-  if (_lock == (MutexImpl *)NULL) {
-    _lock = new MutexImpl;
+  if (_lock == (ReMutexImpl *)NULL) {
+    _lock = new ReMutexImpl;
   }
   }
 }
 }

+ 1 - 1
dtool/src/dtoolbase/typeRegistry.cxx

@@ -25,7 +25,7 @@
 
 
 #include <algorithm>
 #include <algorithm>
 
 
-MutexImpl *TypeRegistry::_lock = NULL;
+ReMutexImpl *TypeRegistry::_lock = NULL;
 TypeRegistry *TypeRegistry::_global_pointer = NULL;
 TypeRegistry *TypeRegistry::_global_pointer = NULL;
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////

+ 1 - 1
dtool/src/dtoolbase/typeRegistry.h

@@ -111,7 +111,7 @@ private:
 
 
   bool _derivations_fresh;
   bool _derivations_fresh;
 
 
-  static MutexImpl *_lock;
+  static ReMutexImpl *_lock;
   static TypeRegistry *_global_pointer;
   static TypeRegistry *_global_pointer;
 
 
   friend class TypeHandle;
   friend class TypeHandle;