summaryrefslogtreecommitdiff
path: root/TAO/tao/RTScheduling/Distributable_Thread.cpp
blob: 998aafe3a5da0e408974c79e2f3d9caeea20a4b6 (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
//$Id$

#include "Distributable_Thread.h"
#include "tao/ORB_Constants.h"

TAO_DistributableThread::TAO_DistributableThread (void)
  :state_ (RTScheduling::DistributableThread::ACTIVE)
{
}

TAO_DistributableThread::~TAO_DistributableThread (void)
{
}

void
TAO_DistributableThread::cancel (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  this->state_ = RTScheduling::DistributableThread::CANCELLED;
}

RTScheduling::DistributableThread::DT_State
TAO_DistributableThread::state (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
  ACE_THROW_SPEC ((CORBA::SystemException))
{
  return this->state_;
}

RTScheduling::DistributableThread_ptr
TAO_DistributableThread_Factory::create_DT (void)
{
  ACE_DECLARE_NEW_CORBA_ENV;
  TAO_DistributableThread* DT = 0;

  ACE_NEW_THROW_EX (DT,
                    TAO_DistributableThread,
                    CORBA::NO_MEMORY (
                      CORBA::SystemException::_tao_minor_code (
                        TAO::VMCID,
                        ENOMEM),
                      CORBA::COMPLETED_NO));
  ACE_CHECK_RETURN (0);

  //RTScheduling::DistributableThread_var dt = RTScheduling::DistributableThread::_narrow (DT
  //                                                                             ACE_ENV_ARG_PARAMETER);
  //ACE_CHECK;

  return DT;
}