⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 reconfig_sched_utils_t.h

📁 这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用于网络游戏医学图像网关的高qos要求.更详细的内容可阅读相应的材料
💻 H
📖 第 1 页 / 共 2 页
字号:
  //   and its dependants, according to its dependencies.
{
public:

  TAO_RSE_Reverse_Propagation_Visitor
    (ACE_TYPENAME TAO_RSE_Dependency_Visitor<RECONFIG_SCHED_STRATEGY, ACE_LOCK>::DEPENDENCY_SET_MAP & dependency_map,
     ACE_TYPENAME TAO_RSE_Dependency_Visitor<RECONFIG_SCHED_STRATEGY, ACE_LOCK>::RT_INFO_MAP & rt_info_map);
  // Constructor.

protected:

  virtual int pre_recurse_action (TAO_Reconfig_Scheduler_Entry &entry,
                                  TAO_Reconfig_Scheduler_Entry &successor,
                                  const RtecScheduler::Dependency_Info &di);
  // Propagates aggregate execution time from successor to calling
  // entry.  Returns 1 on success (to prevent recursion on the
  // successor), and -1 on error.

};


template <class RECONFIG_SCHED_STRATEGY, class ACE_LOCK>
class TAO_RSE_Forward_Propagation_Visitor :
  public TAO_RSE_Dependency_Visitor<RECONFIG_SCHED_STRATEGY, ACE_LOCK>
  // = TITLE
  //   A scheduler entry visitor that propagates effective periods and
  //   execution time multipliers between nodes in a topologically
  //   ordered graph.
  //
  // = DESCRIPTION
  //   This class computes the effective period of each node, according to
  //   its dependencies, and the period and threads it specifies.
{
public:

  TAO_RSE_Forward_Propagation_Visitor
    (ACE_TYPENAME TAO_RSE_Dependency_Visitor<RECONFIG_SCHED_STRATEGY, ACE_LOCK>::DEPENDENCY_SET_MAP & dependency_map,
     ACE_TYPENAME TAO_RSE_Dependency_Visitor<RECONFIG_SCHED_STRATEGY, ACE_LOCK>::RT_INFO_MAP & rt_info_map);
  // Constructor.

  int unresolved_locals (void);
  // Accessor for number of nodes with unresolved local dependencies.

  void unresolved_locals (int);
  // Mutator for numberof nodes with unresolved local dependencies.

  int unresolved_remotes (void);
  // Accessor for number of nodes with unresolved remote dependencies.

  void unresolved_remotes (int);
  // Mutator for number of nodes with unresolved remote dependencies.

  int thread_specification_errors (void);
  // Accessor for number of nodes with thread specification errors.

  void thread_specification_errors (int);
  // Mutator for number of nodes with thread specification errors.

protected:
  virtual int prefix_action (TAO_Reconfig_Scheduler_Entry &rse);
  // Tests the entry for possibly having unresolved remote or local
  // dependencies prior to visiting any of its successors.  Returns 0
  // on success and -1 on error (having unresolved remote or local
  // dependencies is not considered an error, at least for this
  // method).

  virtual int pre_recurse_action (TAO_Reconfig_Scheduler_Entry &entry,
                                  TAO_Reconfig_Scheduler_Entry &successor,
                                  const RtecScheduler::Dependency_Info &di);
  // Propagates effective period and execution time multiplier from
  // entry to successor prior to visiting successor.  Returns 1 on
  // success (to prevent recursion on the successor), and -1 on error.

private:

  int unresolved_locals_;
  // Number of nodes with unresolved local dependencies.

  int unresolved_remotes_;
  // Number of nodes with unresolved remote dependencies.

  int thread_specification_errors_;
  // Number of nodes with thread specification errors.
};

template <class RECONFIG_SCHED_STRATEGY, class ACE_LOCK>
class TAO_RSE_Priority_Visitor :
  public TAO_Reconfig_Sched_Entry_Visitor
  // = TITLE
  //   An entry visitor that assigns static priority and subpriority
  //   values to entries in an array already sorted in static
  //   <priority, subpriority> order.
  //
  // = DESCRIPTION
  //   The visitor uses the parameterized strategy type to determine
  //   priority and subpriority boundaries.
{
public:

  TAO_RSE_Priority_Visitor (RtecScheduler::handle_t handles,
                            TAO_Reconfig_Scheduler_Entry ** entry_ptr_array);
  // Constructor.

    virtual int visit (TAO_Reconfig_Scheduler_Entry &);
  // Visit a RT_Info tuple.  This method assigns a priority and
  // subpriority value to each tuple.  Priorities are assigned in
  // increasing value order, with lower numbers corresponding to
  // higher priorities.  Returns -1 on error, 1 if a new priority was
  // assigned, or 0 otherwise.

  int finish ();
  // Finishes tuple priority assignment by iterating over the
  // remaining tuples in the last subpriority level, and adjusting
  // their subpriorities.

private:

  TAO_Reconfig_Scheduler_Entry *previous_entry_;
  // Pointer to previous tuple in the iteration.

  TAO_Reconfig_Scheduler_Entry **first_subpriority_entry_;
  // Pointer to first subpriority tuple in the priority level.

  RtecScheduler::Preemption_Priority_t priority_;
  // Current priority value.

  RtecScheduler::Preemption_Subpriority_t subpriority_;
  // Current subpriority value.

  RtecScheduler::OS_Priority os_priority_;
  // Current OS (thread) priority value.

  RtecScheduler::handle_t handles_;
  // Number of handles in the entry pointer array.

  TAO_Reconfig_Scheduler_Entry ** entry_ptr_array_;
  // An array of pointers to entries we will be visiting.
};

template <class RECONFIG_SCHED_STRATEGY>
class TAO_Tuple_Admission_Visitor :
  public TAO_RT_Info_Tuple_Visitor
  // = TITLE

  //   A tuple visitor that accumulates utilization separately for
  //   critical and non-critical operations.  Operation tuples that
  //   fit within the threashold defined for their criticality level
  //   are admitted to the schedule, by updating the corresponding
  //   RT_Info with the tuple data.
  //
  // = DESCRIPTION
  //   The visitor uses the parameterized strategy type to determine
  //   whether or not a given operation is critical.
{
public:

  TAO_Tuple_Admission_Visitor (const CORBA::Double & critical_utilization_threshold,
                               const CORBA::Double & noncritical_utilization_threshold);
  // Constructor.

    virtual int visit (TAO_RT_Info_Tuple &);
  // Visit an RT_Info tuple.  This method determines the utilization by
  // the tuple, and if it's admissible, updates its RT_Info and either
  // the critical or non-critical utilization, depending on whether or
  // not the strategy says the operation is critical.

  CORBA::Double critical_utilization ();
  // Accessor for utilization by critical operations.

  CORBA::Double noncritical_utilization ();
  // Accessor for utilization by noncritical operations.

  CORBA::Double critical_utilization_threshold ();
  // Accessor for utilization by critical operations.

  CORBA::Double noncritical_utilization_threshold ();
  // Accessor for utilization by noncritical operations.

private:

  CORBA::Double critical_utilization_;
  // Utilization by critical operations.

  CORBA::Double noncritical_utilization_;
  // Utilization by noncritical operations.

  CORBA::Double critical_utilization_threshold_;
  // Utilization by critical operations.

  CORBA::Double noncritical_utilization_threshold_;
  // Utilization by noncritical operations.
};

template <class RECONFIG_SCHED_STRATEGY, class ACE_LOCK>
class TAO_RSE_Criticality_Propagation_Visitor :
  public TAO_RSE_Dependency_Visitor<RECONFIG_SCHED_STRATEGY, ACE_LOCK>
  // = TITLE
  //   A scheduler entry visitor that propagates criticality 
  //   from called to calling nodes in a topologically ordered
  //   graph.
  //
  // = DESCRIPTION
  //   This class computes the criticality of each node
  //   and its dependants, according to its dependencies.
{
public:

  TAO_RSE_Criticality_Propagation_Visitor
    (ACE_TYPENAME TAO_RSE_Dependency_Visitor<RECONFIG_SCHED_STRATEGY, ACE_LOCK>::DEPENDENCY_SET_MAP & dependency_map,
     ACE_TYPENAME TAO_RSE_Dependency_Visitor<RECONFIG_SCHED_STRATEGY, ACE_LOCK>::RT_INFO_MAP & rt_info_map);
  // Constructor.

protected:

  virtual int pre_recurse_action (TAO_Reconfig_Scheduler_Entry &entry,
                                  TAO_Reconfig_Scheduler_Entry &successor,
                                  const RtecScheduler::Dependency_Info &di);
  // Propagates criticality from successor to calling
  // entry.  Returns 1 on success (to prevent recursion on the
  // successor), and -1 on error.

};


#if defined (__ACE_INLINE__)
#include "Reconfig_Sched_Utils_T.i"
#endif /* __ACE_INLINE__ */


#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
#include "Reconfig_Sched_Utils_T.cpp"
#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */

#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
#pragma implementation ("Reconfig_Sched_Utils_T.cpp")
#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */

#include /**/ "ace/post.h"
#endif /* TAO_RECONFIG_SCHED_UTILS_T_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -