OS_Errno.cpp

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 // $Id: OS_Errno.cpp 80826 2008-03-04 14:51:23Z wotte $
00003 
00004 #include "ace/OS_Errno.h"
00005 
00006 ACE_RCSID(ace, OS_Errno, "$Id: OS_Errno.cpp 80826 2008-03-04 14:51:23Z wotte $")
00007 
00008 // Inlining this class on debug builds with gcc on Solaris can cause
00009 // deadlocks during static initialization. On non debug builds it
00010 // causes compilation errors.
00011 #if !defined (ACE_HAS_INLINED_OSCALLS) || \
00012     (defined (__GNUG__) && defined (__sun__))
00013 # if defined (ACE_INLINE)
00014 #  undef ACE_INLINE
00015 # endif /* ACE_INLINE */
00016 # define ACE_INLINE
00017 # include "ace/OS_Errno.inl"
00018 #endif /* ACE_HAS_INLINED_OSCALLS */
00019 
00020 #if defined (ACE_HAS_WINCE_BROKEN_ERRNO)
00021 
00022 #include "ace/OS_Memory.h"
00023 
00024 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00025 
00026 ACE_CE_Errno *ACE_CE_Errno::instance_ = 0;
00027 DWORD ACE_CE_Errno::errno_key_ = 0xffffffff;
00028 
00029 void
00030 ACE_CE_Errno::init ()
00031 {
00032   ACE_NEW (ACE_CE_Errno::instance_,
00033            ACE_CE_Errno ());
00034   ACE_CE_Errno::errno_key_ = TlsAlloc ();
00035 }
00036 
00037 void
00038 ACE_CE_Errno::fini ()
00039 {
00040   TlsFree (ACE_CE_Errno::errno_key_);
00041   delete ACE_CE_Errno::instance_;
00042   ACE_CE_Errno::instance_ = 0;
00043 }
00044 
00045 ACE_END_VERSIONED_NAMESPACE_DECL
00046 
00047 #endif /* ACE_HAS_WINCE_BROKEN_ERRNO */

Generated on Tue Feb 2 17:18:41 2010 for ACE by  doxygen 1.4.7