summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/Event/Performance/Inversion.h
blob: 03c07d71439ad4da3815f9f9b10ec997fbe6dbfa (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
46
47
48
49
50
51
52
53
54
55
56
57
/* -*- C++ -*- */
//=============================================================================
/**
 *  @file   Inversion.h
 *
 *  @author Carlos O'Ryan (coryan@cs.wustl.edu)
 */
//=============================================================================


#ifndef EC_INVERSION_H
#define EC_INVERSION_H

#include "Driver.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

/**
 * @class EC_Inversion
 *
 * @brief Measure priority inversions in the EC.
 */
class EC_Inversion : public EC_Driver
{
public:
  /// Constructor
  EC_Inversion (void);

  // = The EC_Driver methods
  /**
   * Parse the arguments, but override the number of consumers.
   * The options controlling the event types are ignored, and only two
   * consumers are created.
   */
  int parse_args (int &argc, ACE_TCHAR *argv[]);

  /**
   * In this test there are two consumers, the high priority consumer
   * receives only events from a single high priority supplier.  The
   * other consumer receives events from a set of low priority
   * suppliers.
   */
  virtual void connect_consumers (void);
  virtual void connect_suppliers (void);

  /// Activate the suppliers at different priorities
  virtual void activate_tasks (void);

private:
  /// If set then both low priority and high priority suppliers
  /// generate the same events.
  int same_events_;
};

#endif /* EC_INVERSION_H */