summaryrefslogtreecommitdiff
path: root/ACE/ace/OS_Errno.cpp
diff options
context:
space:
mode:
authorWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-24 15:50:30 +0000
committerWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-24 15:50:30 +0000
commitc44379cc7d9c7aa113989237ab0f56db12aa5219 (patch)
tree66a84b20d47f2269d8bdc6e0323f338763424d3a /ACE/ace/OS_Errno.cpp
parent3aff90f4a822fcf5d902bbfbcc9fa931d6191a8c (diff)
downloadATCD-c44379cc7d9c7aa113989237ab0f56db12aa5219.tar.gz
Repo restructuring
Diffstat (limited to 'ACE/ace/OS_Errno.cpp')
-rw-r--r--ACE/ace/OS_Errno.cpp46
1 files changed, 46 insertions, 0 deletions
diff --git a/ACE/ace/OS_Errno.cpp b/ACE/ace/OS_Errno.cpp
new file mode 100644
index 00000000000..25266ae5c55
--- /dev/null
+++ b/ACE/ace/OS_Errno.cpp
@@ -0,0 +1,46 @@
+// -*- C++ -*-
+// $Id$
+
+#include "ace/OS_Errno.h"
+
+ACE_RCSID(ace, OS_Errno, "$Id$")
+
+// Inlining this class on debug builds with gcc on Solaris can cause
+// deadlocks during static initialization.
+#if !defined (ACE_HAS_INLINED_OSCALLS) || \
+ (defined (__GNUG__) && defined (__sun__) && !defined (ACE_NDEBUG))
+# if defined (ACE_INLINE)
+# undef ACE_INLINE
+# endif /* ACE_INLINE */
+# define ACE_INLINE
+# include "ace/OS_Errno.inl"
+#endif /* ACE_HAS_INLINED_OSCALLS */
+
+#if defined (ACE_HAS_WINCE_BROKEN_ERRNO)
+
+#include "ace/OS_Memory.h"
+
+ACE_BEGIN_VERSIONED_NAMESPACE_DECL
+
+ACE_CE_Errno *ACE_CE_Errno::instance_ = 0;
+DWORD ACE_CE_Errno::errno_key_ = 0xffffffff;
+
+void
+ACE_CE_Errno::init ()
+{
+ ACE_NEW (ACE_CE_Errno::instance_,
+ ACE_CE_Errno ());
+ ACE_CE_Errno::errno_key_ = TlsAlloc ();
+}
+
+void
+ACE_CE_Errno::fini ()
+{
+ TlsFree (ACE_CE_Errno::errno_key_);
+ delete ACE_CE_Errno::instance_;
+ ACE_CE_Errno::instance_ = 0;
+}
+
+ACE_END_VERSIONED_NAMESPACE_DECL
+
+#endif /* ACE_HAS_WINCE_BROKEN_ERRNO */