diff options
author | Dave Parks <davep@lindenlab.com> | 2010-11-02 16:30:46 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2010-11-02 16:30:46 -0500 |
commit | 126c8e371c4c90f23e5f28475cb9e57871e7e7be (patch) | |
tree | 7bbf0acad843d77cbc0a45c763a371070acd5d76 /indra | |
parent | 7aff5c6ff9f951a9a15c035845d57801889442fa (diff) |
Make sure mutex is locked before waiting on a signal.
Reviewed by Nyx.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llcommon/llthread.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp index 9a33324129..59e28948f5 100644 --- a/indra/llcommon/llthread.cpp +++ b/indra/llcommon/llthread.cpp @@ -406,6 +406,10 @@ LLCondition::~LLCondition() void LLCondition::wait() { + if (!isLocked()) + { //mAPRMutexp MUST be locked before calling apr_thread_cond_wait + apr_thread_mutex_lock(mAPRMutexp); + } apr_thread_cond_wait(mAPRCondp, mAPRMutexp); } |