summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryamuna <yamuna@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-06-27 03:03:29 +0000
committeryamuna <yamuna@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-06-27 03:03:29 +0000
commit3f007a850c802bf07b0d34f0a8ad1e1f07966eb0 (patch)
tree6d1d83b6b7e6d91b6c074cd2936d3e8af07c15ad
parent87041647376df38155b6f7dc3ae64d96bc3cec21 (diff)
downloadATCD-3f007a850c802bf07b0d34f0a8ad1e1f07966eb0.tar.gz
ChangelogTag: Thu Jun 26 22:34:10 2003 Yamuna Krishnamurthy <yamuna@oomworks.com>
-rw-r--r--TAO/tao/RTScheduling/Distributable_Thread.cpp48
-rw-r--r--TAO/tao/RTScheduling/Distributable_Thread.h35
2 files changed, 83 insertions, 0 deletions
diff --git a/TAO/tao/RTScheduling/Distributable_Thread.cpp b/TAO/tao/RTScheduling/Distributable_Thread.cpp
new file mode 100644
index 00000000000..d5af3bbf81d
--- /dev/null
+++ b/TAO/tao/RTScheduling/Distributable_Thread.cpp
@@ -0,0 +1,48 @@
+//$Id$
+
+#include "Distributable_Thread.h"
+
+TAO_DistributableThread::TAO_DistributableThread (void)
+ :state_ (RTScheduling::DistributableThread::ACTIVE)
+{
+}
+
+TAO_DistributableThread::~TAO_DistributableThread (void)
+{
+}
+
+void
+TAO_DistributableThread::cancel (ACE_ENV_SINGLE_ARG_DECL)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ this->state_ = RTScheduling::DistributableThread::CANCELLED;
+}
+
+RTScheduling::DistributableThread::DT_State
+TAO_DistributableThread::state (ACE_ENV_SINGLE_ARG_DECL)
+ 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;
+
+ ACE_NEW_THROW_EX (DT,
+ TAO_DistributableThread,
+ CORBA::NO_MEMORY (
+ CORBA::SystemException::_tao_minor_code (
+ TAO_DEFAULT_MINOR_CODE,
+ ENOMEM),
+ CORBA::COMPLETED_NO));
+ ACE_CHECK_RETURN (0);
+
+ //RTScheduling::DistributableThread_var dt = RTScheduling::DistributableThread::_narrow (DT
+ // ACE_ENV_ARG_PARAMETER);
+ //ACE_CHECK;
+
+ return DT;
+}
diff --git a/TAO/tao/RTScheduling/Distributable_Thread.h b/TAO/tao/RTScheduling/Distributable_Thread.h
new file mode 100644
index 00000000000..81f38d59b78
--- /dev/null
+++ b/TAO/tao/RTScheduling/Distributable_Thread.h
@@ -0,0 +1,35 @@
+//$Id$
+
+#ifndef DISTRIBUTABLE_THREAD_H
+#define DISTRIBUTABLE_THREAD_H
+
+#include "tao/RTScheduling/RTSchedulerC.h"
+
+class TAO_RTScheduler_Export TAO_DistributableThread
+: public RTScheduling::DistributableThread
+{
+ public:
+
+ TAO_DistributableThread (void);
+
+ ~TAO_DistributableThread (void);
+
+ virtual void cancel (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+
+ virtual RTScheduling::DistributableThread::DT_State state (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ private:
+ RTScheduling::DistributableThread::DT_State state_;
+};
+
+
+class TAO_DistributableThread_Factory
+{
+public:
+ static RTScheduling::DistributableThread_ptr create_DT (void);
+};
+
+#endif /*DISTRIBUTABLE_THREAD_H*/