From 291c14a9b41b596e8e4c6a65be3951117d29bcae Mon Sep 17 00:00:00 2001 From: David Rose Date: Thu, 5 Apr 2007 14:38:25 +0000 Subject: [PATCH] oops, another threading fix --- dtool/src/dtoolbase/deletedChain.T | 2 +- dtool/src/dtoolbase/deletedChain.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dtool/src/dtoolbase/deletedChain.T b/dtool/src/dtoolbase/deletedChain.T index b1b63d584f..60e2e6bf3e 100644 --- a/dtool/src/dtoolbase/deletedChain.T +++ b/dtool/src/dtoolbase/deletedChain.T @@ -258,7 +258,7 @@ init_lock() { //////////////////////////////////////////////////////////////////// template void DeletedChain:: -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 diff --git a/dtool/src/dtoolbase/deletedChain.h b/dtool/src/dtoolbase/deletedChain.h index 87a801b83c..ee3e99af97 100644 --- a/dtool/src/dtoolbase/deletedChain.h +++ b/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 };