📄 reconfig_scheduler_t.h
字号:
// Assumes it is being called with all locks held, and does *not*
// set any schedule stability flags.
virtual void remove_dependency_i (RtecScheduler::handle_t handle,
RtecScheduler::handle_t dependency,
CORBA::Long number_of_calls,
RtecScheduler::Dependency_Type_t dependency_type
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException,
RtecScheduler::SYNCHRONIZATION_FAILURE,
RtecScheduler::INTERNAL,
RtecScheduler::UNKNOWN_TASK));
// Internal method that removes a dependency between two RT_Infos.
// Assumes it is being called with all locks held, and does *not*
// set any schedule stability flags.
virtual void set_dependency_enable_state_i (RtecScheduler::handle_t handle,
RtecScheduler::handle_t dependency,
CORBA::Long number_of_calls,
RtecScheduler::Dependency_Type_t dependency_type,
RtecScheduler::Dependency_Enabled_Type_t enabled
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException,
RtecScheduler::SYNCHRONIZATION_FAILURE,
RtecScheduler::INTERNAL,
RtecScheduler::UNKNOWN_TASK));
// Internal method that enables or disables a dependency between two RT_Infos.
// Assumes it is being called with all locks held, and does *not*
// set any schedule stability flags.
virtual void map_dependency_i
(RtecScheduler::handle_t key,
RtecScheduler::handle_t handle,
ACE_TYPENAME TAO_Reconfig_Scheduler<RECONFIG_SCHED_STRATEGY, ACE_LOCK>::DEPENDENCY_SET_MAP &dependency_map,
CORBA::Long number_of_calls,
RtecScheduler::Dependency_Type_t dependency_type,
RtecScheduler::Dependency_Enabled_Type_t enabled
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException,
RtecScheduler::INTERNAL,
RtecScheduler::UNKNOWN_TASK));
// This method installs a dependency in a dependency set map.
void unmap_dependency_i (RtecScheduler::handle_t key,
RtecScheduler::handle_t handle,
ACE_TYPENAME TAO_Reconfig_Scheduler<RECONFIG_SCHED_STRATEGY, ACE_LOCK>::DEPENDENCY_SET_MAP &dependency_map,
CORBA::Long number_of_calls,
RtecScheduler::Dependency_Type_t dependency_type
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException,
RtecScheduler::INTERNAL,
RtecScheduler::UNKNOWN_TASK));
// This method removes a dependency from a dependency set map.
void map_dependency_enable_state_i (RtecScheduler::handle_t key,
RtecScheduler::handle_t handle,
ACE_TYPENAME
TAO_Reconfig_Scheduler<RECONFIG_SCHED_STRATEGY, ACE_LOCK>::DEPENDENCY_SET_MAP &dependency_map,
CORBA::Long number_of_calls,
RtecScheduler::Dependency_Type_t dependency_type,
RtecScheduler::Dependency_Enabled_Type_t enabled
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException,
RtecScheduler::INTERNAL,
RtecScheduler::UNKNOWN_TASK));
// This method updates the enable state of a dependency in a dependency set map.
virtual void dfs_traverse_i (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException,
RtecScheduler::INTERNAL));
// Traverses dependency graph, assigning a topological ordering.
// Resets DFS map entries, do DFS traversal, constructs DFS map.
virtual void detect_cycles_i (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException,
RtecScheduler::INTERNAL,
RtecScheduler::CYCLIC_DEPENDENCIES));
// Sorts an array of RT_info handles in topological order, then
// checks for loops, marks unresolved remote dependencies.
void perform_admission_i (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException,
RtecScheduler::INTERNAL));
// Compute aggregate execution times, then performs admission over
// rate tuples.
void crit_dfs_traverse_i (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException,
RtecScheduler::INTERNAL));
// Traverses criticality dependency graph, assigning a topological
// ordering. Resets DFS map entries, do DFS traversal, constructs
// DFS map.
void propagate_criticalities_i (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException,
RtecScheduler::INTERNAL));
// Propagates criticalities.
void propagate_characteristics_i (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException,
RtecScheduler::INTERNAL,
RtecScheduler::UNRESOLVED_LOCAL_DEPENDENCIES,
RtecScheduler::THREAD_SPECIFICATION));
// Propagates effective execution time and period, sets total frame size.
virtual void assign_priorities_i (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException,
RtecScheduler::INTERNAL,
RtecScheduler::DUPLICATE_NAME));
// Sort operations by urgency (done by strategy), then assign
// priorities and subpriorities in one pass. (Re)computes utilization
// and sets last scheduled priority and last feasible priority.
void refresh_tuple_ptr_array_i (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException,
RtecScheduler::INTERNAL));
// Refreshes the array of tuple pointers, corrects the count.
/* WSOA merge - commented out
virtual void compute_utilization_i (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException,
RtecScheduler::INTERNAL));
// Compute utilization, set last feasible priority.
static void init_rt_info (RtecScheduler::RT_Info &rt_info)
ACE_THROW_SPEC ((CORBA::SystemException));
// Helper method to give an RT_Info some reasonable default values
*/
// = Protected class members.
RECONFIG_SCHED_STRATEGY sched_strategy_;
// Scheduling strategy for the reconfig scheduler.
CONFIG_INFO_MAP config_info_map_;
// Map for O(1) lookup of Config_Infos by priority level.
long config_info_count_;
// The number of config infos, which is also the number of priority
// levels.
RT_INFO_MAP rt_info_map_;
// Map for O(1) lookup of RT_Infos by handle.
long rt_info_count_;
// The number of registered RT_Infos.
long rt_info_tuple_count_;
// The number of registered RT_Info tuples.
RT_INFO_TREE rt_info_tree_;
// Tree for O(log n) lookup of RT_Infos by name.
DEPENDENCY_SET_MAP calling_dependency_set_map_;
// Map for O(1) lookup of RT_Info dependency
// set by the caller operation's handle.
DEPENDENCY_SET_MAP called_dependency_set_map_;
// Map for O(1) lookup of RT_Info dependency
// set by the called operation's handle.
DEPENDENCY_SET_MAP crit_dependency_set_map_;
// Map for O(1) lookup of RT_Info dependency set. The above two maps
// store the calling and called dependencies. This map stores the
// true dependencies based on criticality propagation direction. For
// two-ways, this is the same as the direction of invocation,
// whereas for one-ways, it is in the opposite direction.
RtecScheduler::handle_t next_handle_;
// Next RT_Info descriptor handle to allocate. The first handle is
// always 1.
TAO_Reconfig_Scheduler_Entry ** entry_ptr_array_;
// Array of pointers to scheduling entries. This
// array is maintained by the methods that create
// scheduling entries, and sorted in topological
// order and then priority order at various points
// during schedule computation.
long entry_ptr_array_size_;
// Size of the array of scheduling entry pointers.
TAO_RT_Info_Tuple ** tuple_ptr_array_;
// Array of pointers to scheduling entries. This
// array is maintained by the methods that create
// scheduling entries, and sorted in topological
// order and then priority order at various points
// during schedule computation.
long tuple_ptr_array_size_;
// Size of the array of scheduling entry pointers.
u_long stability_flags_;
// Flags indicating whether a stable schedule has been computed
// since the last addition or modification of information, and which
// parts of the schedule are unstable.
int enforce_schedule_stability_;
// Indicates whether the scheduler should enforce stability by
// throwing an exception: otherwise for operations where this
// matters, it will simply return a default value if nothing
// has been generated.
int dependency_count_;
// The number of dependencies in the dependency lists of all RT_Infos.
// This is used when traversing the dependency graph.
RtecScheduler::Preemption_Priority_t last_scheduled_priority_;
// Stores the last priority for which an operation can be scheduled
CORBA::Double noncritical_utilization_;
// Utilization by noncritical tasks.
CORBA::Double critical_utilization_;
// Utilization by critical tasks.
CORBA::Double noncritical_utilization_threshold_;
// Utilization by noncritical tasks.
CORBA::Double critical_utilization_threshold_;
// Utilization by critical tasks.
ACE_LOCK mutex_;
// Mutual exclusion lock for the scheduler itself. This is needed to
// synchronize updates and accesses to scheduling information.
};
template <class ARRAY_ELEMENT_TYPE> void
maintain_scheduling_array (ARRAY_ELEMENT_TYPE ** & current_ptr_array,
long & current_ptr_array_size,
RtecScheduler::handle_t handle
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException));
// Helper function: makes sure there is room in the scheduling pointer
// arrays. This function expands the array eagerly, to minimize time
// overhead for memory allocation (at a cost of some unused space).
#if defined (__ACE_INLINE__)
#include "Reconfig_Scheduler_T.i"
#endif /* __ACE_INLINE__ */
#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
#include "Reconfig_Scheduler_T.cpp"
#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
#pragma implementation ("Reconfig_Scheduler_T.cpp")
#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
#include /**/ "ace/post.h"
#endif /* TAO_RECONFIG_SCHEDULER_T_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -