Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

ACE_OS_Object_Manager Class Reference

#include <OS.h>

Inheritance diagram for ACE_OS_Object_Manager:

Inheritance graph
[legend]
Collaboration diagram for ACE_OS_Object_Manager:

Collaboration graph
[legend]
List of all members.

Public Types

enum  Preallocated_Object { ACE_OS_EMPTY_PREALLOCATED_OBJECT, ACE_OS_PREALLOCATED_OBJECTS }
 Unique identifiers for preallocated objects. More...


Public Methods

virtual int init (void)
 Explicitly initialize. More...

virtual int fini (void)
 Explicitly destroy. More...

 ACE_OS_Object_Manager (void)
 Constructor. More...

 ~ACE_OS_Object_Manager (void)
 Destructor. More...


Static Public Methods

int starting_up (void)
int shutting_down (void)
 Returns 1 after the <ACE_OS_Object_Manager> has been destroyed. See <ACE_Object_Manager::shutting_down> for more information. More...

sigset_t * default_mask (void)
 Accesses a default signal set used, for example, in <ACE_Sig_Guard> methods. More...

ACE_Thread_Hookthread_hook (void)
 Returns the current thread hook for the process. More...

ACE_Thread_Hookthread_hook (ACE_Thread_Hook *new_thread_hook)
 Returns the existing thread hook and assign a <new_thread_hook>. More...


Private Methods

int at_exit (ACE_EXIT_HOOK func)
 For <ACE_OS::atexit> support. More...


Static Private Methods

ACE_OS_Object_Manager * instance (void)
 Accessor to singleton instance. More...

void print_error_message (u_int line_number, const ACE_TCHAR *message)
 For use by init () and fini (), to consolidate error reporting. More...


Private Attributes

sigset_t * default_mask_
 Default signal set used, for example, in ACE_Sig_Guard. More...

ACE_Thread_Hookthread_hook_
 Thread hook that's used by this process. More...

ACE_OS_Exit_Info exit_info_
 For at_exit support. More...


Static Private Attributes

ACE_OS_Object_Manager * instance_ = 0
 Singleton instance pointer. More...

void * preallocated_object [ACE_OS_PREALLOCATED_OBJECTS] = { 0 }
 Table of preallocated objects. More...


Friends

class ACE_OS
 This class is for internal use by ACE_OS, etc., only. More...

class ACE_Object_Manager
class ACE_OS_Object_Manager_Manager
class ACE_TSS_Cleanup
class ACE_TSS_Emulation
class ACE_Log_Msg
void ACE_OS_Object_Manager_Internal_Exit_Hook ()

Member Enumeration Documentation

enum ACE_OS_Object_Manager::Preallocated_Object
 

Unique identifiers for preallocated objects.

Enumeration values:
ACE_OS_EMPTY_PREALLOCATED_OBJECT 
ACE_OS_PREALLOCATED_OBJECTS  This enum value must be last!

Definition at line 6256 of file OS.h.

06257     {
06258 # if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
06259       ACE_OS_MONITOR_LOCK,
06260       ACE_TSS_CLEANUP_LOCK,
06261       ACE_LOG_MSG_INSTANCE_LOCK,
06262 #   if defined (ACE_HAS_TSS_EMULATION)
06263       ACE_TSS_KEY_LOCK,
06264 #     if defined (ACE_HAS_THREAD_SPECIFIC_STORAGE)
06265       ACE_TSS_BASE_LOCK,
06266 #     endif /* ACE_HAS_THREAD_SPECIFIC_STORAGE */
06267 #   endif /* ACE_HAS_TSS_EMULATION */
06268 # else
06269       // Without ACE_MT_SAFE, There are no preallocated objects.  Make
06270       // sure that the preallocated_array size is at least one by
06271       // declaring this dummy . . .
06272       ACE_OS_EMPTY_PREALLOCATED_OBJECT,
06273 # endif /* ACE_MT_SAFE */
06274 
06275       /// This enum value must be last!
06276       ACE_OS_PREALLOCATED_OBJECTS
06277     };


Constructor & Destructor Documentation

ACE_OS_Object_Manager::ACE_OS_Object_Manager void   
 

Constructor.

Definition at line 6556 of file OS.cpp.

References ACE_SEH_Default_Exception_Handler, and ACE_SEH_Default_Exception_Selector.

06558   : thread_hook_ (0)
06559   , exit_info_ ()
06560 #if defined (ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS)
06561   , seh_except_selector_ (ACE_SEH_Default_Exception_Selector)
06562   , seh_except_handler_ (ACE_SEH_Default_Exception_Handler)
06563 #endif /* ACE_HAS_WIN32_STRUCTURAL_EXCEPTIONS */
06564 {
06565   // If instance_ was not 0, then another ACE_OS_Object_Manager has
06566   // already been instantiated (it is likely to be one initialized by
06567   // way of library/DLL loading).  Let this one go through
06568   // construction in case there really is a good reason for it (like,
06569   // ACE is a static/archive library, and this one is the non-static
06570   // instance (with ACE_HAS_NONSTATIC_OBJECT_MANAGER, or the user has
06571   // a good reason for creating a separate one) but the original one
06572   // will be the one retrieved from calls to
06573   // ACE_Object_Manager::instance().
06574 
06575   // Be sure that no further instances are created via instance ().
06576   if (instance_ == 0)
06577     instance_ = this;
06578 
06579   init ();
06580 }

ACE_OS_Object_Manager::~ACE_OS_Object_Manager void   
 

Destructor.

Definition at line 6582 of file OS.cpp.

References ACE_Object_Manager_Base::dynamically_allocated_, and fini.

06583 {
06584   dynamically_allocated_ = 0;   // Don't delete this again in fini()
06585   fini ();
06586 }


Member Function Documentation

int ACE_OS_Object_Manager::at_exit ACE_EXIT_HOOK    func [private]
 

For <ACE_OS::atexit> support.

Definition at line 6868 of file OS.cpp.

References ACE_CLEANUP_FUNC, ace_exit_hook_marker, ACE_OS_Exit_Info::at_exit_i, and exit_info_.

Referenced by ACE_OS::atexit.

06869 {
06870   return exit_info_.at_exit_i (&ace_exit_hook_marker,
06871                                ACE_reinterpret_cast (ACE_CLEANUP_FUNC, func),
06872                                0);
06873 }

sigset_t * ACE_OS_Object_Manager::default_mask void    [static]
 

Accesses a default signal set used, for example, in <ACE_Sig_Guard> methods.

Definition at line 6589 of file OS.cpp.

References default_mask_, and instance.

Referenced by ACE_Sig_Guard::ACE_Sig_Guard, and ACE_Object_Manager::default_mask.

06590 {
06591   return ACE_OS_Object_Manager::instance ()->default_mask_;
06592 }

int ACE_OS_Object_Manager::fini void    [virtual]
 

Explicitly destroy.

Implements ACE_Object_Manager_Base.

Definition at line 6756 of file OS.cpp.

References ACE_LIB_TEXT, ACE_OS_DELETE_PREALLOCATED_OBJECT, ACE_OS_Exit_Info::call_hooks, default_mask_, exit_info_, ACE_Object_Manager_Base::fini, instance_, ACE_Object_Manager_Base::next_, ACE_Object_Manager_Base::OBJ_MAN_SHUT_DOWN, ACE_Object_Manager_Base::OBJ_MAN_SHUTTING_DOWN, ACE_Object_Manager_Base::object_manager_state_, preallocated_object, print_error_message, ACE_OS::recursive_mutex_destroy, ACE_Object_Manager_Base::shutting_down_i, ACE_OS::socket_fini, and ACE_OS::thread_mutex_destroy.

Referenced by ACE_OS_Object_Manager_Internal_Exit_Hook, ACE_Object_Manager::fini, and ~ACE_OS_Object_Manager.

06757 {
06758   if (instance_ == 0  ||  shutting_down_i ())
06759     // Too late.  Or, maybe too early.  Either fini () has already
06760     // been called, or init () was never called.
06761     return object_manager_state_ == OBJ_MAN_SHUT_DOWN  ?  1  :  -1;
06762 
06763   // No mutex here.  Only the main thread should destroy the singleton
06764   // ACE_OS_Object_Manager instance.
06765 
06766   // Indicate that the ACE_OS_Object_Manager instance is being shut
06767   // down.  This object manager should be the last one to be shut
06768   // down.
06769   object_manager_state_ = OBJ_MAN_SHUTTING_DOWN;
06770 
06771   // If another Object_Manager has registered for termination, do it.
06772   if (next_)
06773     {
06774       next_->fini ();
06775       next_ = 0;  // Protect against recursive calls.
06776     }
06777 
06778   // Call all registered cleanup hooks, in reverse order of
06779   // registration.
06780   exit_info_.call_hooks ();
06781 
06782   // Only clean up preallocated objects when the singleton Instance is being
06783   // destroyed.
06784   if (this == instance_)
06785     {
06786       // Close down Winsock (no-op on other platforms).
06787       ACE_OS::socket_fini ();
06788 
06789 #if ! defined (ACE_HAS_STATIC_PREALLOCATION)
06790       // Cleanup the dynamically preallocated objects.
06791 # if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
06792 #   if !defined(ACE_HAS_BROKEN_PREALLOCATED_OBJECTS_AFTER_FORK)
06793       if (ACE_OS::thread_mutex_destroy
06794           // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor.
06795           (ACE_reinterpret_cast (ACE_thread_mutex_t *, ACE_OS_Object_Manager::preallocated_object[ACE_OS_MONITOR_LOCK])) != 0)
06796         ACE_OS_Object_Manager::print_error_message (
06797           __LINE__, ACE_LIB_TEXT ("ACE_OS_MONITOR_LOCK"));
06798 #   endif /* ! ACE_HAS_BROKEN_PREALLOCATED_OBJECTS_AFTER_FORK */
06799       ACE_OS_DELETE_PREALLOCATED_OBJECT (ACE_thread_mutex_t,
06800                                          ACE_OS_MONITOR_LOCK)
06801 #   if !defined(ACE_HAS_BROKEN_PREALLOCATED_OBJECTS_AFTER_FORK)
06802       if (ACE_OS::recursive_mutex_destroy
06803           // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor.
06804           (ACE_reinterpret_cast (ACE_recursive_thread_mutex_t *, ACE_OS_Object_Manager::preallocated_object[ACE_TSS_CLEANUP_LOCK])) != 0)
06805         ACE_OS_Object_Manager::print_error_message (
06806           __LINE__, ACE_LIB_TEXT ("ACE_TSS_CLEANUP_LOCK"));
06807 #   endif /* ! ACE_HAS_BROKEN_PREALLOCATED_OBJECTS_AFTER_FORK */
06808       ACE_OS_DELETE_PREALLOCATED_OBJECT (ACE_recursive_thread_mutex_t,
06809                                          ACE_TSS_CLEANUP_LOCK)
06810 #   if !defined(ACE_HAS_BROKEN_PREALLOCATED_OBJECTS_AFTER_FORK)
06811       if (ACE_OS::thread_mutex_destroy
06812           // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor.
06813           (ACE_reinterpret_cast (ACE_thread_mutex_t *, ACE_OS_Object_Manager::preallocated_object [ACE_LOG_MSG_INSTANCE_LOCK])) != 0)
06814         ACE_OS_Object_Manager::print_error_message (
06815           __LINE__, ACE_LIB_TEXT ("ACE_LOG_MSG_INSTANCE_LOCK "));
06816 #   endif /* ! ACE_HAS_BROKEN_PREALLOCATED_OBJECTS_AFTER_FORK */
06817       ACE_OS_DELETE_PREALLOCATED_OBJECT (ACE_thread_mutex_t,
06818                                          ACE_LOG_MSG_INSTANCE_LOCK)
06819 #   if defined (ACE_HAS_TSS_EMULATION)
06820 #     if !defined(ACE_HAS_BROKEN_PREALLOCATED_OBJECTS_AFTER_FORK)
06821         if (ACE_OS::recursive_mutex_destroy
06822             // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor.
06823             (ACE_reinterpret_cast (ACE_recursive_thread_mutex_t *, ACE_OS_Object_Manager::preallocated_object[ACE_TSS_KEY_LOCK])) != 0)
06824           ACE_OS_Object_Manager::print_error_message (
06825             __LINE__, ACE_LIB_TEXT ("ACE_TSS_KEY_LOCK"));
06826 #     endif /* ! ACE_HAS_BROKEN_PREALLOCATED_OBJECTS_AFTER_FORK */
06827       ACE_OS_DELETE_PREALLOCATED_OBJECT (ACE_recursive_thread_mutex_t,
06828                                          ACE_TSS_KEY_LOCK)
06829 #     if defined (ACE_HAS_THREAD_SPECIFIC_STORAGE)
06830 #       if !defined(ACE_HAS_BROKEN_PREALLOCATED_OBJECTS_AFTER_FORK)
06831           if (ACE_OS::recursive_mutex_destroy
06832               // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor.
06833               (ACE_reinterpret_cast (ACE_recursive_thread_mutex_t *, ACE_OS_Object_Manager::preallocated_object[ACE_TSS_BASE_LOCK])) != 0)
06834             ACE_OS_Object_Manager::print_error_message (
06835               __LINE__, ACE_LIB_TEXT ("ACE_TSS_BASE_LOCK"));
06836 #       endif /* ! ACE_HAS_BROKEN_PREALLOCATED_OBJECTS_AFTER_FORK */
06837       ACE_OS_DELETE_PREALLOCATED_OBJECT (ACE_recursive_thread_mutex_t,
06838                                          ACE_TSS_BASE_LOCK)
06839 #     endif /* ACE_HAS_THREAD_SPECIFIC_STORAGE */
06840 #   endif /* ACE_HAS_TSS_EMULATION */
06841 #   if defined (ACE_HAS_WINCE_BROKEN_ERRNO)
06842           ACE_CE_Errno::fini ();
06843 #   endif /* ACE_HAS_WINCE_BROKEN_ERRNO */
06844 # endif /* ACE_MT_SAFE */
06845 #endif /* ! ACE_HAS_STATIC_PREALLOCATION */
06846     }
06847 
06848   delete default_mask_;
06849   default_mask_ = 0;
06850 
06851   // Indicate that this ACE_OS_Object_Manager instance has been shut down.
06852   object_manager_state_ = OBJ_MAN_SHUT_DOWN;
06853 
06854   if (dynamically_allocated_)
06855     {
06856       delete this;
06857     }
06858 
06859   if (this == instance_)
06860     instance_ = 0;
06861 
06862   return 0;
06863 }

int ACE_OS_Object_Manager::init void    [virtual]
 

Explicitly initialize.

Implements ACE_Object_Manager_Base.

Definition at line 6671 of file OS.cpp.

References ACE_LIB_TEXT, ACE_NEW_RETURN, ACE_OS_Object_Manager_Internal_Exit_Hook, ACE_OS_PREALLOCATE_OBJECT, ACE_WSOCK_VERSION, default_mask_, instance_, ACE_Object_Manager_Base::OBJ_MAN_INITIALIZED, ACE_Object_Manager_Base::OBJ_MAN_INITIALIZING, ACE_Object_Manager_Base::object_manager_state_, preallocated_object, print_error_message, ACE_OS::recursive_mutex_init, ACE_OS::set_exit_hook, ACE_OS::sigfillset, ACE_OS::socket_init, ACE_Object_Manager_Base::starting_up_i, ACE_OS::thread_mutex_init, and ACE_OS::win32_versioninfo_.

06672 {
06673   if (starting_up_i ())
06674     {
06675       // First, indicate that this ACE_OS_Object_Manager instance is being
06676       // initialized.
06677       object_manager_state_ = OBJ_MAN_INITIALIZING;
06678 
06679       if (this == instance_)
06680         {
06681 # if defined (ACE_MT_SAFE) && (ACE_MT_SAFE != 0)
06682 #   if defined (ACE_HAS_WINCE_BROKEN_ERRNO)
06683           ACE_CE_Errno::init ();
06684 #   endif /* ACE_HAS_WINCE_BROKEN_ERRNO */
06685           ACE_OS_PREALLOCATE_OBJECT (ACE_thread_mutex_t, ACE_OS_MONITOR_LOCK)
06686           if (ACE_OS::thread_mutex_init
06687               // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor.
06688               (ACE_reinterpret_cast (ACE_thread_mutex_t *, ACE_OS_Object_Manager::preallocated_object[ACE_OS_MONITOR_LOCK])) != 0)
06689             ACE_OS_Object_Manager::print_error_message (
06690               __LINE__, ACE_LIB_TEXT ("ACE_OS_MONITOR_LOCK"));
06691           ACE_OS_PREALLOCATE_OBJECT (ACE_recursive_thread_mutex_t,
06692                                      ACE_TSS_CLEANUP_LOCK)
06693           if (ACE_OS::recursive_mutex_init
06694               // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor.
06695               (ACE_reinterpret_cast (ACE_recursive_thread_mutex_t *, ACE_OS_Object_Manager::preallocated_object[ACE_TSS_CLEANUP_LOCK])) != 0)
06696             ACE_OS_Object_Manager::print_error_message (
06697               __LINE__, ACE_LIB_TEXT ("ACE_TSS_CLEANUP_LOCK"));
06698           ACE_OS_PREALLOCATE_OBJECT (ACE_thread_mutex_t,
06699                                      ACE_LOG_MSG_INSTANCE_LOCK)
06700           if (ACE_OS::thread_mutex_init
06701               // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor.
06702               (ACE_reinterpret_cast (ACE_thread_mutex_t *, ACE_OS_Object_Manager::preallocated_object[ACE_LOG_MSG_INSTANCE_LOCK])) != 0)
06703             ACE_OS_Object_Manager::print_error_message (
06704               __LINE__, ACE_LIB_TEXT ("ACE_LOG_MSG_INSTANCE_LOCK"));
06705 #   if defined (ACE_HAS_TSS_EMULATION)
06706           ACE_OS_PREALLOCATE_OBJECT (ACE_recursive_thread_mutex_t,
06707                                      ACE_TSS_KEY_LOCK)
06708           if (ACE_OS::recursive_mutex_init
06709               // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor.
06710               (ACE_reinterpret_cast (ACE_recursive_thread_mutex_t *, ACE_OS_Object_Manager::preallocated_object[ACE_TSS_KEY_LOCK])) != 0)
06711             ACE_OS_Object_Manager::print_error_message (
06712               __LINE__, ACE_LIB_TEXT ("ACE_TSS_KEY_LOCK"));
06713 #     if defined (ACE_HAS_THREAD_SPECIFIC_STORAGE)
06714           ACE_OS_PREALLOCATE_OBJECT (ACE_recursive_thread_mutex_t,
06715                                      ACE_TSS_BASE_LOCK)
06716           if (ACE_OS::recursive_mutex_init
06717               // This line must not be broken to avoid tickling a bug with SunC++'s preprocessor.
06718               (ACE_reinterpret_cast (ACE_recursive_thread_mutex_t *, ACE_OS_Object_Manager::preallocated_object[ACE_TSS_BASE_LOCK])) != 0)
06719             ACE_OS_Object_Manager::print_error_message (
06720               __LINE__, ACE_LIB_TEXT ("ACE_TSS_BASE_LOCK"));
06721 #     endif /* ACE_HAS_THREAD_SPECIFIC_STORAGE */
06722 #   endif /* ACE_HAS_TSS_EMULATION */
06723 # endif /* ACE_MT_SAFE */
06724 
06725           // Open Winsock (no-op on other platforms).
06726           ACE_OS::socket_init (ACE_WSOCK_VERSION);
06727 
06728           // Register the exit hook, for use by ACE_OS::exit ().
06729           ACE_OS::set_exit_hook (&ACE_OS_Object_Manager_Internal_Exit_Hook);
06730         }
06731 
06732       ACE_NEW_RETURN (default_mask_, sigset_t, -1);
06733       ACE_OS::sigfillset (default_mask_);
06734 
06735       // Finally, indicate that the ACE_OS_Object_Manager instance has
06736       // been initialized.
06737       object_manager_state_ = OBJ_MAN_INITIALIZED;
06738 
06739 # if defined (ACE_WIN32)
06740       ACE_OS::win32_versioninfo_.dwOSVersionInfoSize =
06741         sizeof (OSVERSIONINFO);
06742       ::GetVersionEx (&ACE_OS::win32_versioninfo_);
06743 # endif /* ACE_WIN32 */
06744       return 0;
06745     } else {
06746       // Had already initialized.
06747       return 1;
06748     }
06749 }

ACE_OS_Object_Manager * ACE_OS_Object_Manager::instance void    [static, private]
 

Accessor to singleton instance.

Definition at line 6646 of file OS.cpp.

References ACE_NEW_RETURN, ACE_Object_Manager_Base::dynamically_allocated_, and instance_.

Referenced by ACE_OS_Object_Manager_Internal_Exit_Hook, ACE_OS_Object_Manager_Manager::ACE_OS_Object_Manager_Manager, ACE_OS::atexit, default_mask, ACE_Object_Manager::init, and thread_hook.

06647 {
06648   // This function should be called during construction of static
06649   // instances, or before any other threads have been created in the
06650   // process.  So, it's not thread safe.
06651 
06652   if (instance_ == 0)
06653     {
06654       ACE_OS_Object_Manager *instance_pointer;
06655 
06656       ACE_NEW_RETURN (instance_pointer,
06657                       ACE_OS_Object_Manager,
06658                       0);
06659       // I (coryan) removed it, using asserts in the OS layer
06660       // brings down the Log msg stuff
06661       // ACE_ASSERT (instance_pointer == instance_);
06662 
06663       instance_pointer->dynamically_allocated_ = 1;
06664 
06665     }
06666 
06667   return instance_;
06668 }

void ACE_OS_Object_Manager::print_error_message u_int    line_number,
const ACE_TCHAR   message
[static, private]
 

For use by init () and fini (), to consolidate error reporting.

Definition at line 6876 of file OS.cpp.

References ACE_LIB_TEXT, and ACE_TCHAR.

Referenced by fini, and init.

06878 {
06879   // To avoid duplication of these const strings in OS.o.
06880 #if !defined (ACE_HAS_WINCE)
06881   fprintf (stderr, "ace/OS.cpp, line %u: %s ",
06882            line_number,
06883            message);
06884   perror ("failed");
06885 #else
06886   // @@ Need to use the following information.
06887   ACE_UNUSED_ARG (line_number);
06888   ACE_UNUSED_ARG (message);
06889 
06890   ACE_TCHAR *lpMsgBuf = 0;
06891   ::FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER |
06892                    FORMAT_MESSAGE_FROM_SYSTEM,
06893                    0,
06894                    ::GetLastError (),
06895                    MAKELANGID (LANG_NEUTRAL,
06896                                SUBLANG_DEFAULT),
06897                    // Default language
06898                    (ACE_TCHAR *) &lpMsgBuf,
06899                    0,
06900                    0);
06901   ::MessageBox (NULL,
06902                 lpMsgBuf,
06903                 ACE_LIB_TEXT ("ACE_OS error"),
06904                 MB_OK);
06905 #endif
06906 }

int ACE_OS_Object_Manager::shutting_down void    [static]
 

Returns 1 after the <ACE_OS_Object_Manager> has been destroyed. See <ACE_Object_Manager::shutting_down> for more information.

Definition at line 6917 of file OS.cpp.

References instance_, and ACE_Object_Manager_Base::shutting_down_i.

Referenced by ACE_Log_Msg::close, and ACE_TSS_Cleanup::remove.

06918 {
06919   return ACE_OS_Object_Manager::instance_
06920     ? instance_->shutting_down_i ()
06921     : 1;
06922 }

int ACE_OS_Object_Manager::starting_up void    [static]
 

Returns 1 before the <ACE_OS_Object_Manager> has been constructed. See <ACE_Object_Manager::starting_up> for more information.

Definition at line 6909 of file OS.cpp.

References instance_, and ACE_Object_Manager_Base::starting_up_i.

Referenced by ACE_Trace::ACE_Trace, ACE_Log_Msg::instance, and ACE_Trace::~ACE_Trace.

06910 {
06911   return ACE_OS_Object_Manager::instance_
06912     ? instance_->starting_up_i ()
06913     : 1;
06914 }

ACE_Thread_Hook * ACE_OS_Object_Manager::thread_hook ACE_Thread_Hook   new_thread_hook [static]
 

Returns the existing thread hook and assign a <new_thread_hook>.

Definition at line 6637 of file OS.cpp.

References instance, and thread_hook_.

06638 {
06639   ACE_OS_Object_Manager *os_om = ACE_OS_Object_Manager::instance ();
06640   ACE_Thread_Hook *old_hook = os_om->thread_hook_;
06641   os_om->thread_hook_ = new_thread_hook;
06642   return old_hook;
06643 }

ACE_Thread_Hook * ACE_OS_Object_Manager::thread_hook void    [static]
 

Returns the current thread hook for the process.

Definition at line 6595 of file OS.cpp.

References instance, and thread_hook_.

Referenced by ACE_OS_Thread_Adapter::invoke, ACE_Thread_Adapter::invoke_i, and ACE_Thread_Hook::thread_hook.

06596 {
06597   return ACE_OS_Object_Manager::instance ()->thread_hook_;
06598 }


Friends And Related Function Documentation

friend class ACE_Log_Msg [friend]
 

Definition at line 6348 of file OS.h.

friend class ACE_Object_Manager [friend]
 

Definition at line 6344 of file OS.h.

friend class ACE_OS [friend]
 

This class is for internal use by ACE_OS, etc., only.

Definition at line 6343 of file OS.h.

void ACE_OS_Object_Manager_Internal_Exit_Hook   [friend]
 

Definition at line 6545 of file OS.cpp.

Referenced by init.

06546 {
06547   if (ACE_OS_Object_Manager::instance_)
06548     ACE_OS_Object_Manager::instance ()->fini ();
06549 }

friend class ACE_OS_Object_Manager_Manager [friend]
 

Definition at line 6345 of file OS.h.

friend class ACE_TSS_Cleanup [friend]
 

Definition at line 6346 of file OS.h.

friend class ACE_TSS_Emulation [friend]
 

Definition at line 6347 of file OS.h.


Member Data Documentation

sigset_t* ACE_OS_Object_Manager::default_mask_ [private]
 

Default signal set used, for example, in ACE_Sig_Guard.

Definition at line 6321 of file OS.h.

Referenced by default_mask, fini, and init.

ACE_OS_Exit_Info ACE_OS_Object_Manager::exit_info_ [private]
 

For at_exit support.

Definition at line 6327 of file OS.h.

Referenced by at_exit, and fini.

ACE_OS_Object_Manager * ACE_OS_Object_Manager::instance_ = 0 [static, private]
 

Singleton instance pointer.

Definition at line 6551 of file OS.cpp.

Referenced by fini, ACE_Object_Manager::fini, init, instance, shutting_down, starting_up, and ACE_OS_Object_Manager_Manager::~ACE_OS_Object_Manager_Manager.

void * ACE_OS_Object_Manager::preallocated_object = { 0 } [static, private]
 

Table of preallocated objects.

Definition at line 6554 of file OS.cpp.

Referenced by ACE_Log_Msg::close, fini, init, ACE_Log_Msg::instance, and ACE_OS::open.

ACE_Thread_Hook* ACE_OS_Object_Manager::thread_hook_ [private]
 

Thread hook that's used by this process.

Definition at line 6324 of file OS.h.

Referenced by thread_hook.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 12:51:50 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002