diff options
Diffstat (limited to 'ace/Mutex.cpp')
-rw-r--r-- | ace/Mutex.cpp | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/ace/Mutex.cpp b/ace/Mutex.cpp index a4085942583..9d9811ce298 100644 --- a/ace/Mutex.cpp +++ b/ace/Mutex.cpp @@ -19,10 +19,10 @@ ACE_Mutex::dump (void) const // ACE_TRACE ("ACE_Mutex::dump"); ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this)); -#if defined (CHORUS) +#if defined (CHORUS) || defined (ACE_HAS_PTHREADS) || defined(ACE_HAS_STHREADS) ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("lockname_ = %s\n"), this->lockname_)); ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("process_lock_ = %x\n"), this->process_lock_)); -#endif /* CHORUS */ +#endif /* CHORUS || ACE_HAS_PTHREADS || ACE_HAS_STHREADS */ ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("\n"))); ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP)); } @@ -33,7 +33,7 @@ ACE_Mutex::ACE_Mutex (int type, const ACE_TCHAR *name, #if defined (CHORUS) || defined (ACE_HAS_PTHREADS) || defined(ACE_HAS_STHREADS) process_lock_ (0), lockname_ (0), -#endif /* CHORUS */ +#endif /* CHORUS || ACE_HAS_PTHREADS || ACE_HAS_STHREADS */ removed_ (0) { // ACE_TRACE ("ACE_Mutex::ACE_Mutex"); @@ -84,21 +84,30 @@ ACE_Mutex::ACE_Mutex (int type, const ACE_TCHAR *name, type, name, arg) != 0) - return; + { + ACE_ERROR ((LM_ERROR, + ACE_LIB_TEXT ("%p\n"), + ACE_LIB_TEXT ("ACE_Mutex::ACE_Mutex"))); + return; + } } - // It is ok to fall through into the <mutex_init> below if the - // USYNC_PROCESS flag is not enabled. + else + { + // local mutex init if USYNC_PROCESS flag is not enabled. #else - ACE_UNUSED_ARG (mode); -#endif /* CHORUS */ + ACE_UNUSED_ARG (mode); +#endif /* CHORUS || ACE_HAS_PTHREADS || ACE_HAS_STHREADS */ - if (ACE_OS::mutex_init (&this->lock_, - type, - name, - arg) != 0) - ACE_ERROR ((LM_ERROR, - ACE_LIB_TEXT ("%p\n"), - ACE_LIB_TEXT ("ACE_Mutex::ACE_Mutex"))); + if (ACE_OS::mutex_init (&this->lock_, + type, + name, + arg) != 0) + ACE_ERROR ((LM_ERROR, + ACE_LIB_TEXT ("%p\n"), + ACE_LIB_TEXT ("ACE_Mutex::ACE_Mutex"))); +#if defined (CHORUS) || defined(ACE_HAS_PTHREADS) || defined (ACE_HAS_STHREADS) + } +#endif /* CHORUS || ACE_HAS_PTHREADS || ACE_HAS_STHREADS */ } ACE_Mutex::~ACE_Mutex (void) |