OS_Errno.cpp

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

Generated on Thu Nov 9 09:41:57 2006 for ACE by doxygen 1.3.6