summaryrefslogtreecommitdiff
path: root/ace/Mutex.cpp
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2004-04-28 13:05:10 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2004-04-28 13:05:10 +0000
commitf325070fbf1d8102607fea7ab5efdf0e06590435 (patch)
tree9cbe824e47f18415c3d5596488999c200ecc150d /ace/Mutex.cpp
parent71aa92740ca83659640700b626a384c1c24ba78a (diff)
downloadATCD-f325070fbf1d8102607fea7ab5efdf0e06590435.tar.gz
ChangeLogTag: Wed Apr 28 13:05:32 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'ace/Mutex.cpp')
-rw-r--r--ace/Mutex.cpp39
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)