From 249ddf8fff21c4e1bceb3ffa63302db0d378765d Mon Sep 17 00:00:00 2001 From: Brian Barrett Date: Fri, 22 Jun 2007 15:28:12 +0000 Subject: [PATCH] Only print warning message about condition variable useage if the MCA param says we should Also, check for != 0, rather than == 1, as there are way too many double locks, but they'll get warned when we do the double lock. No need to warn again, in a meaningless way. Originally part of r15167, reverted with r15172. This commit was SVN r15173. The following SVN revision numbers were found above: r15167 --> open-mpi/ompi@faa401dc479f617ac3f4adf1a745b06217f205b2 r15172 --> open-mpi/ompi@5f16251808c4c56773e3a45d11294567c763834a --- opal/threads/condition.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opal/threads/condition.h b/opal/threads/condition.h index fb396ff99c..f5c204ea65 100644 --- a/opal/threads/condition.h +++ b/opal/threads/condition.h @@ -63,7 +63,7 @@ static inline int opal_condition_wait(opal_condition_t *c, opal_mutex_t *m) c->c_waiting++; #if OMPI_ENABLE_DEBUG && !OMPI_HAVE_THREAD_SUPPORT - if (1 != m->m_lock_debug) { \ + if (opal_mutex_check_locks && 0 == m->m_lock_debug) { \ opal_output(0, "Warning -- mutex not locked in condition_wait"); \ } \ m->m_lock_debug--; @@ -111,7 +111,7 @@ static inline int opal_condition_timedwait(opal_condition_t *c, int rc = 0; #if OMPI_ENABLE_DEBUG && !OMPI_HAVE_THREAD_SUPPORT - if (1 != m->m_lock_debug) { \ + if (opal_mutex_check_locks && 0 == m->m_lock_debug) { \ opal_output(0, "Warning -- mutex not locked in condition_wait"); \ } \ m->m_lock_debug--;