summaryrefslogtreecommitdiff
path: root/TAO/performance-tests/Cubit/COOL/MT_Cubit/Util_Thread.h
blob: b336c11c2de94792a55409116e3db106b436707a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// $Id$

// ============================================================================
//
// = LIBRARY
//    TAO/tests
//
// = FILENAME
//    Util_Thread.h
//
// = AUTHOR
//    Andy Gokhale, Sumedh Mungee, and Sergio Flores-Gaitan
//
// ============================================================================

#include "Task_Client.h"

const int CUBIT_ARBIT_NUMBER = 2064885;

class Util_Thread : public ACE_Task<ACE_MT_SYNCH>
  // = TITLE
  //     The thread that computes utilization.
{
public:
  Util_Thread (Task_State *,
               ACE_Thread_Manager *thr_mgr);
  // constructor.

  virtual int svc (void);
  // The thread entry point function.

  double get_number_of_computations (void);
  // Gets the number of computations the thread was able to perform.

  int done_;
  // Indicates whether we're done.

private:
  int run_computations (void);
  // Run the computations.

  // Sumedh, please add comments here.
  double number_of_computations_;
  Task_State *ts_;
};