8 #ifndef OPENDDS_DCPS_THREADSTATUSMANAGER_H 9 #define OPENDDS_DCPS_THREADSTATUSMANAGER_H 22 #if defined (ACE_WIN32) 26 # ifdef ACE_HAS_GETTID 27 typedef pid_t ThreadId;
43 , status_(ThreadStatus_Active)
60 static const size_t bucket_count = 8;
82 thread_status_interval_ = thread_status_interval;
83 bucket_limit_ = thread_status_interval /
static_cast<double>(Thread::bucket_count);
88 return thread_status_interval_;
102 : thread_status_manager_(thread_status_manager)
104 thread_status_manager_.add_thread(name);
109 thread_status_manager_.finished();
119 : thread_status_manager_(thread_status_manager)
121 thread_status_manager_.active(
true);
126 thread_status_manager_.idle(
true);
136 : thread_status_manager_(thread_status_manager)
138 thread_status_manager_.idle();
143 thread_status_manager_.active();
154 List& finished)
const;
156 #ifdef ACE_HAS_GETTID 157 static inline pid_t gettid()
159 return syscall(SYS_gettid);
164 static ThreadId get_thread_id();
166 void active(
bool nested =
false);
167 void idle(
bool nested =
false);
void thread_status_interval(const TimeDuration &thread_status_interval)
const TimeDuration & thread_status_interval() const
Start(ThreadStatusManager &thread_status_manager, const String &name)
#define OpenDDS_Dcps_Export
MonotonicTimePoint last_update_
const MonotonicTimePoint & last_update() const
bool update_thread_status() const
const String & bit_key() const
ThreadStatusManager & thread_status_manager_
Sleeper(ThreadStatusManager &thread_status_manager)
TimeDuration thread_status_interval_
Event(ThreadStatusManager &thread_status_manager)
Thread(const String &bit_key)
static const TimeDuration zero_value
ThreadStatusManager & thread_status_manager_
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
SystemTimePoint timestamp_
TimeDuration bucket_limit_
The Internal API and Implementation of OpenDDS.
typedef OPENDDS_MAP(OPENDDS_STRING, OPENDDS_STRING) ValueMap
Helper types and functions for config file parsing.
typedef OPENDDS_LIST(SubsectionPair) KeyList
const SystemTimePoint & timestamp() const
ThreadStatusManager & thread_status_manager_