aboutsummaryrefslogtreecommitdiff
path: root/externals/ace/Thread_Mutex.cpp
diff options
context:
space:
mode:
authorRat <none@none>2010-06-07 19:10:55 +0200
committerRat <none@none>2010-06-07 19:10:55 +0200
commit32546e22828e793e3881e1055acb72b6a044e331 (patch)
tree759706cdfe8423887c69a2f8ed651c0c1e5ab7d7 /externals/ace/Thread_Mutex.cpp
parent2e0f8fb6e558088b33bdee83bc5ff20014e983b3 (diff)
added ace + vcproj for win
--HG-- branch : trunk
Diffstat (limited to 'externals/ace/Thread_Mutex.cpp')
-rw-r--r--externals/ace/Thread_Mutex.cpp62
1 files changed, 62 insertions, 0 deletions
diff --git a/externals/ace/Thread_Mutex.cpp b/externals/ace/Thread_Mutex.cpp
new file mode 100644
index 00000000000..4ebdc412e6f
--- /dev/null
+++ b/externals/ace/Thread_Mutex.cpp
@@ -0,0 +1,62 @@
+/**
+ * @file Thread_Mutex.cpp
+ *
+ * $Id: Thread_Mutex.cpp 80826 2008-03-04 14:51:23Z wotte $
+ *
+ * Originally in Synch.cpp
+ *
+ * @author Douglas C. Schmidt <schmidt@cs.wustl.edu>
+ */
+
+#include "ace/Thread_Mutex.h"
+
+#if defined (ACE_HAS_THREADS)
+
+#if !defined (__ACE_INLINE__)
+#include "ace/Thread_Mutex.inl"
+#endif /* __ACE_INLINE__ */
+
+#include "ace/Log_Msg.h"
+#include "ace/Malloc_T.h"
+
+ACE_RCSID(ace, Thread_Mutex, "$Id: Thread_Mutex.cpp 80826 2008-03-04 14:51:23Z wotte $")
+
+ACE_BEGIN_VERSIONED_NAMESPACE_DECL
+
+ACE_ALLOC_HOOK_DEFINE(ACE_Thread_Mutex)
+
+void
+ACE_Thread_Mutex::dump (void) const
+{
+#if defined (ACE_HAS_DUMP)
+// ACE_TRACE ("ACE_Thread_Mutex::dump");
+
+ ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
+ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n")));
+ ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
+#endif /* ACE_HAS_DUMP */
+}
+
+ACE_Thread_Mutex::~ACE_Thread_Mutex (void)
+{
+// ACE_TRACE ("ACE_Thread_Mutex::~ACE_Thread_Mutex");
+ this->remove ();
+}
+
+ACE_Thread_Mutex::ACE_Thread_Mutex (const ACE_TCHAR *name, ACE_mutexattr_t *arg)
+ : removed_ (false)
+{
+// ACE_TRACE ("ACE_Thread_Mutex::ACE_Thread_Mutex");
+
+ if (ACE_OS::thread_mutex_init (&this->lock_,
+ 0,
+ name,
+ arg) != 0)
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("%p\n"),
+ ACE_TEXT ("ACE_Thread_Mutex::ACE_Thread_Mutex")));
+}
+
+ACE_END_VERSIONED_NAMESPACE_DECL
+
+#endif /* ACE_HAS_THREADS */