3 //=============================================================================
5 * @file Num_Threads_Monitor.h
7 * @author Jeff Parsons <j.parsons@vanderbilt.edu>
9 //=============================================================================
11 #ifndef NUM_THREADS_MONITOR_H
12 #define NUM_THREADS_MONITOR_H
14 #include /**/ "ace/pre.h"
16 #include "ace/Monitor_Base.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #if defined (ACE_HAS_MONITOR_FRAMEWORK) && (ACE_HAS_MONITOR_FRAMEWORK == 1)
24 #if defined (ACE_HAS_PDH_H) && !defined (ACE_LACKS_PDH_H)
25 #include "ace/Monitor_Control/Windows_Monitor.h"
28 #include "ace/Monitor_Control/Monitor_Control_export.h"
30 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
34 namespace Monitor_Control
37 * @class Num_Threads_Monitor
39 * @brief Monitor total number of threads in the system.
41 class MONITOR_CONTROL_Export Num_Threads_Monitor
43 #if defined (ACE_HAS_WIN32_PDH)
44 , public Windows_Monitor
48 Num_Threads_Monitor (const char* name
);
50 /// Implementation of the pure virtual method.
51 virtual void update ();
53 /// Stores the default name, used if none is supplied by the user.
54 static const char* default_name ();
57 /// Overridden reset, calls platform-specific reset.
58 virtual void clear_i ();
61 static const char* default_name_
;
63 #if defined (ACE_LINUX)
66 unsigned long nthreads_
;
72 ACE_END_VERSIONED_NAMESPACE_DECL
74 #endif /* ACE_HAS_MONITOR_FRAMEWORK==1 */
76 #include /**/ "ace/post.h"
78 #endif // NUM_THREADS_MONITOR_H