Explorar el Código

oops, another threading fix

David Rose hace 19 años
padre
commit
291c14a9b4
Se han modificado 2 ficheros con 2 adiciones y 2 borrados
  1. 1 1
      dtool/src/dtoolbase/deletedChain.T
  2. 1 1
      dtool/src/dtoolbase/deletedChain.h

+ 1 - 1
dtool/src/dtoolbase/deletedChain.T

@@ -258,7 +258,7 @@ init_lock() {
 ////////////////////////////////////////////////////////////////////
 template<class Type>
 void DeletedChain<Type>::
-do_init_lock(MutexImpl *lock) {
+do_init_lock(MutexImpl *&lock) {
   MutexImpl *new_lock = new MutexImpl;
 
   // Even though DELETED_CHAIN_USE_ATOMIC_EXCHANGE is not true, we

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

@@ -119,7 +119,7 @@ private:
   // If we don't have atomic compare-and-exchange, we need to use a
   // Mutex to protect the above linked list.
   static INLINE void init_lock();
-  static void do_init_lock(MutexImpl *lock);
+  static void do_init_lock(MutexImpl *&lock);
   static MutexImpl *_lock;
 #endif
 };