00001 // -*- C++ -*- 00002 00003 // =================================================================== 00004 /** 00005 * @file ORB_Core_TSS_Resources.h 00006 * 00007 * $Id: ORB_Core_TSS_Resources.h 74014 2006-08-14 13:52:22Z johnnyw $ 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 private: 00052 00053 /// The ORB Core TSS resources should not be copied 00054 TAO_ORB_Core_TSS_Resources (const TAO_ORB_Core_TSS_Resources&); 00055 void operator= (const TAO_ORB_Core_TSS_Resources&); 00056 00057 public: 00058 00059 /** 00060 * @todo 00061 * The rest of the resources are not currently in use, just a plan 00062 * for the future... 00063 */ 00064 /// Counter for how (nested) calls this thread has made to run the 00065 /// event loop. 00066 int event_loop_thread_; 00067 00068 /// Counter for how many times this thread has become a client 00069 /// leader. 00070 int client_leader_thread_; 00071 00072 /// Lane for this thread. 00073 void *lane_; 00074 00075 /// Generic container for thread-specific objects. 00076 ACE_Array_Base<void *> ts_objects_; 00077 00078 // Set to true by the wait_on_lf_no_nested_upcall wait strategy 00079 // @CJC@ maybe we should use allocate_tss_slot_id() instead? 00080 bool upcalls_temporarily_suspended_on_this_thread_; 00081 00082 /// Pointer to the ORB core. Needed to get access to the TSS 00083 /// cleanup functions for the TSS objects stored in the TSS object 00084 /// array in this class. 00085 TAO_ORB_Core *orb_core_; 00086 }; 00087 00088 TAO_END_VERSIONED_NAMESPACE_DECL 00089 00090 #include /**/ "ace/post.h" 00091 #endif /* TAO_ORB_CORE_H */