#include <Current.h>
Public Member Functions | |
DTTask (TAO_ORB_Core *orb, DT_Hash_Map *dt_hash, TAO_RTScheduler_Current_i *, RTScheduling::ThreadAction_ptr start, CORBA::VoidData data, const char *name, CORBA::Policy_ptr sched_param, CORBA::Policy_ptr implicit_sched_param) | |
virtual | ~DTTask (void) |
int | activate_task (RTCORBA::Priority base_priority, CORBA::ULong stack_size) |
virtual int | svc (void) |
Private Attributes | |
TAO_ORB_Core * | orb_ |
DT_Hash_Map * | dt_hash_ |
TAO_RTScheduler_Current_i * | current_ |
RTScheduling::ThreadAction_var | start_ |
CORBA::VoidData | data_ |
RTScheduling::Current::IdType | guid_ |
CORBA::String_var | name_ |
CORBA::Policy_var | sched_param_ |
CORBA::Policy_var | implicit_sched_param_ |
Definition at line 307 of file Current.h.
DTTask::DTTask | ( | TAO_ORB_Core * | orb, | |
DT_Hash_Map * | dt_hash, | |||
TAO_RTScheduler_Current_i * | new_current, | |||
RTScheduling::ThreadAction_ptr | start, | |||
CORBA::VoidData | data, | |||
const char * | name, | |||
CORBA::Policy_ptr | sched_param, | |||
CORBA::Policy_ptr | implicit_sched_param | |||
) |
Definition at line 577 of file Current.cpp.
:orb_ (orb), dt_hash_ (dt_hash), current_ (new_current), start_ (RTScheduling::ThreadAction::_duplicate (start)), data_ (data), name_ (CORBA::string_dup (name)), sched_param_ (CORBA::Policy::_duplicate (sched_param)), implicit_sched_param_ (CORBA::Policy::_duplicate (implicit_sched_param)) { }
DTTask::~DTTask | ( | void | ) | [virtual] |
Definition at line 596 of file Current.cpp.
{ delete this->current_; }
int DTTask::activate_task | ( | RTCORBA::Priority | base_priority, | |
CORBA::ULong | stack_size | |||
) |
Definition at line 530 of file Current.cpp.
{ // Activate thread. long default_flags = THR_NEW_LWP | THR_JOINABLE; long flags = default_flags | this->orb_->orb_params ()->scope_policy () | this->orb_->orb_params ()->sched_policy (); CORBA::Object_var object = this->orb_->object_ref_table ().resolve_initial_reference ( TAO_OBJID_PRIORITYMAPPINGMANAGER); RTCORBA::PriorityMappingManager_var mapping_manager = RTCORBA::PriorityMappingManager::_narrow (object.in () ); RTCORBA::PriorityMapping *pm = mapping_manager->mapping (); RTCORBA::NativePriority native_priority; pm->to_native (base_priority, native_priority); size_t stack [1]; stack [0] = stack_size; if (this->activate (flags, 1, 0,//force_active native_priority,//priority -1,//grp_id 0,//ACE_Task_Base 0,//thread_handles 0,//stack stack//stack_size ) == -1) { if (ACE_OS::last_error () == EPERM) ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("Insufficient privilege to run this test.\n")), -1); } return 0; }
int DTTask::svc | ( | void | ) | [virtual] |
Reimplemented from ACE_Task_Base.
Definition at line 602 of file Current.cpp.
{ try { TAO_TSS_Resources *tss = TAO_TSS_Resources::instance (); tss->rtscheduler_current_impl_ = this->current_; this->current_->begin_scheduling_segment (this->name_.in (), this->sched_param_.in (), this->implicit_sched_param_.in () ); // Invoke entry point into new DT. this->start_->_cxx_do (this->data_ ); this->current_->end_scheduling_segment (this->name_.in () ); } catch (const ::CORBA::Exception& ex) { ex._tao_print_exception ("Caught exception:"); return -1; } return 0; }
TAO_RTScheduler_Current_i* DTTask::current_ [private] |
CORBA::VoidData DTTask::data_ [private] |
DT_Hash_Map* DTTask::dt_hash_ [private] |
RTScheduling::Current::IdType DTTask::guid_ [private] |
CORBA::String_var DTTask::name_ [private] |
TAO_ORB_Core* DTTask::orb_ [private] |
CORBA::Policy_var DTTask::sched_param_ [private] |
RTScheduling::ThreadAction_var DTTask::start_ [private] |