Browse Source

oops, another threading fix

David Rose 19 years ago
parent
commit
291c14a9b4
2 changed files with 2 additions and 2 deletions
  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>
 template<class Type>
 void DeletedChain<Type>::
 void DeletedChain<Type>::
-do_init_lock(MutexImpl *lock) {
+do_init_lock(MutexImpl *&lock) {
   MutexImpl *new_lock = new MutexImpl;
   MutexImpl *new_lock = new MutexImpl;
 
 
   // Even though DELETED_CHAIN_USE_ATOMIC_EXCHANGE is not true, we
   // 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
   // If we don't have atomic compare-and-exchange, we need to use a
   // Mutex to protect the above linked list.
   // Mutex to protect the above linked list.
   static INLINE void init_lock();
   static INLINE void init_lock();
-  static void do_init_lock(MutexImpl *lock);
+  static void do_init_lock(MutexImpl *&lock);
   static MutexImpl *_lock;
   static MutexImpl *_lock;
 #endif
 #endif
 };
 };