00001 // -*- C++ -*- 00002 00003 // =================================================================== 00004 /** 00005 * @file ORB_Core_TSS_Resources.h 00006 * 00007 * $Id: ORB_Core_TSS_Resources.h 91153 2010-07-21 10:04:02Z vzykov $ 00008 * 00009 * @author DOC Center - Washington University at St. Louis 00010 * @author DOC Laboratory - University of California at Irvine 00011 */ 00012 // =================================================================== 00013 00014 #ifndef TAO_ORB_CORE_TSS_RESOURCES_H 00015 #define TAO_ORB_CORE_TSS_RESOURCES_H 00016 00017 #include /**/ "ace/pre.h" 00018 00019 #include /**/ "tao/TAO_Export.h" 00020 00021 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00022 # pragma once 00023 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00024 00025 #include "tao/orbconf.h" 00026 #include "ace/Array_Base.h" 00027 00028 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00029 00030 class TAO_ORB_Core; 00031 00032 /** 00033 * @class TAO_ORB_Core_TSS_Resources 00034 * 00035 * @brief The TSS resoures of an ORB core. 00036 * 00037 * This class is used by the ORB_Core to store the resources 00038 * potentially bound to a thread in TSS storage. The members are public 00039 * because only the ORB Core is expected to access them. 00040 */ 00041 class TAO_Export TAO_ORB_Core_TSS_Resources 00042 { 00043 public: 00044 00045 /// Constructor 00046 TAO_ORB_Core_TSS_Resources (void); 00047 00048 /// destructor 00049 ~TAO_ORB_Core_TSS_Resources (void); 00050 00051 /// Cleans TSS resources. 00052 void fini (void); 00053 00054 private: 00055 00056 /// The ORB Core TSS resources should not be copied 00057 TAO_ORB_Core_TSS_Resources (const TAO_ORB_Core_TSS_Resources&); 00058 void operator= (const TAO_ORB_Core_TSS_Resources&); 00059 00060 public: 00061 00062 /** 00063 * @todo 00064 * The rest of the resources are not currently in use, just a plan 00065 * for the future... 00066 */ 00067 /// Counter for how (nested) calls this thread has made to run the 00068 /// event loop. 00069 int event_loop_thread_; 00070 00071 /// Counter for how many times this thread has become a client 00072 /// leader. 00073 int client_leader_thread_; 00074 00075 /// Lane for this thread. 00076 void *lane_; 00077 00078 /// Generic container for thread-specific objects. 00079 ACE_Array_Base<void *> ts_objects_; 00080 00081 // Set to true by the wait_on_lf_no_nested_upcall wait strategy 00082 // @CJC@ maybe we should use allocate_tss_slot_id() instead? 00083 bool upcalls_temporarily_suspended_on_this_thread_; 00084 00085 /// Pointer to the ORB core. Needed to get access to the TSS 00086 /// cleanup functions for the TSS objects stored in the TSS object 00087 /// array in this class. 00088 TAO_ORB_Core *orb_core_; 00089 }; 00090 00091 TAO_END_VERSIONED_NAMESPACE_DECL 00092 00093 #include /**/ "ace/post.h" 00094 #endif /* TAO_ORB_CORE_H */