summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryamuna <yamuna@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-08-13 22:14:43 +0000
committeryamuna <yamuna@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-08-13 22:14:43 +0000
commitccce0b74d744f016463aa89dd7e1a752807df6a9 (patch)
treed016e8e65070516aedb1ac2f4681e1ae01238001
parentd02f0691f3739afe1fd35ef58b5e3d5d16e79976 (diff)
downloadATCD-ccce0b74d744f016463aa89dd7e1a752807df6a9.tar.gz
*** empty log message ***
-rw-r--r--TAO/examples/RTScheduling/Fixed_Priority_Scheduler/test.cpp1
-rw-r--r--TAO/examples/RTScheduling/Fixed_Priority_Scheduler/test.h4
-rw-r--r--TAO/examples/RTScheduling/MIF_Scheduler/test.h4
-rw-r--r--TAO/tao/RTScheduling/Current.cpp18
-rw-r--r--TAO/tao/RTScheduling/Current.h2
-rw-r--r--TAO/tests/RTScheduling/Current/Thread_Task.cpp4
-rw-r--r--TAO/tests/RTScheduling/DT_Spawn/test.cpp4
-rw-r--r--TAO/tests/RTScheduling/Scheduling_Interceptor/test_client.cpp6
-rw-r--r--TAO/tests/RTScheduling/Scheduling_Interceptor/test_server.cpp62
-rw-r--r--TAO/tests/RTScheduling/Thread_Cancel/Thread_Task.cpp4
-rw-r--r--TAO/tests/RTScheduling/Thread_Cancel/test.cpp4
11 files changed, 73 insertions, 40 deletions
diff --git a/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/test.cpp b/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/test.cpp
index d68f937cd5b..ac676c49ab8 100644
--- a/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/test.cpp
+++ b/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/test.cpp
@@ -4,7 +4,6 @@
#include "tao/RTScheduling/RTScheduler_Manager.h"
#include "tao/ORB_Core.h"
#include "ace/Arg_Shifter.h"
-//#include "FP_DT_Creator.h"
#include "../Thread_Task.h"
#include "../Task_Stats.h"
#include "../Synch_i.h"
diff --git a/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/test.h b/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/test.h
index f06674c6ee2..70e043e4f21 100644
--- a/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/test.h
+++ b/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/test.h
@@ -1,7 +1,7 @@
//$Id$
#ifndef TEST_H
#define TEST_H
-#include "ace/pre.h"
+#include /**/ "ace/pre.h"
#include "FP_Scheduler.h"
@@ -65,5 +65,5 @@ class DT_Test :public ACE_Task <ACE_SYNCH>
typedef ACE_Singleton <DT_Test, TAO_SYNCH_MUTEX> DT_TEST;
-#include "ace/post.h"
+#include /**/ "ace/post.h"
#endif /*TEST_H*/
diff --git a/TAO/examples/RTScheduling/MIF_Scheduler/test.h b/TAO/examples/RTScheduling/MIF_Scheduler/test.h
index 63e1377e076..c1a90de91d9 100644
--- a/TAO/examples/RTScheduling/MIF_Scheduler/test.h
+++ b/TAO/examples/RTScheduling/MIF_Scheduler/test.h
@@ -1,7 +1,7 @@
//$Id$
#ifndef TEST_H
#define TEST_H
-#include "ace/pre.h"
+#include /**/ "ace/pre.h"
#include "MIF_Scheduler.h"
@@ -53,5 +53,5 @@ class DT_Test //:public ACE_Task <ACE_SYNCH>
typedef ACE_Singleton <DT_Test, TAO_SYNCH_MUTEX> DT_TEST;
-#include "ace/post.h"
+#include /**/ "ace/post.h"
#endif /*TEST_H*/
diff --git a/TAO/tao/RTScheduling/Current.cpp b/TAO/tao/RTScheduling/Current.cpp
index fe1402b105f..e58c83428dd 100644
--- a/TAO/tao/RTScheduling/Current.cpp
+++ b/TAO/tao/RTScheduling/Current.cpp
@@ -966,7 +966,7 @@ TAO_RTScheduler_Current_ptr TAO_RTScheduler_Current::_unchecked_narrow (
(
ACE_reinterpret_cast
(
- ptr_arith_t,
+ ptrdiff_t,
&TAO_RTScheduler_Current::_narrow
)
)
@@ -981,22 +981,22 @@ TAO_RTScheduler_Current::_duplicate (TAO_RTScheduler_Current_ptr obj)
return obj;
}
-void *TAO_RTScheduler_Current::_tao_QueryInterface (ptr_arith_t type)
+void *TAO_RTScheduler_Current::_tao_QueryInterface (ptrdiff_t type)
{
void *retv = 0;
if (type == ACE_reinterpret_cast
- (ptr_arith_t,
+ (ptrdiff_t,
&TAO_RTScheduler_Current::_narrow))
retv = ACE_reinterpret_cast (void*, this);
else if (type == ACE_reinterpret_cast (
- ptr_arith_t,
+ ptrdiff_t,
&ACE_NESTED_CLASS (::RTScheduling, Current)::_tao_class_id)
)
{
retv = ACE_reinterpret_cast (void*, this);
}
else if (type == ACE_reinterpret_cast (
- ptr_arith_t,
+ ptrdiff_t,
&::RTCORBA::Current::_tao_class_id)
)
{
@@ -1010,7 +1010,7 @@ void *TAO_RTScheduler_Current::_tao_QueryInterface (ptr_arith_t type)
);
}
else if (type == ACE_reinterpret_cast (
- ptr_arith_t,
+ ptrdiff_t,
&::CORBA::Current::_tao_class_id)
)
{
@@ -1024,7 +1024,7 @@ void *TAO_RTScheduler_Current::_tao_QueryInterface (ptr_arith_t type)
);
}
else if (type == ACE_reinterpret_cast (
- ptr_arith_t,
+ ptrdiff_t,
&CORBA::Object::_tao_class_id)
)
{
@@ -1036,7 +1036,7 @@ void *TAO_RTScheduler_Current::_tao_QueryInterface (ptr_arith_t type)
}
// else if (type == ACE_reinterpret_cast
-// (ptr_arith_t,
+// (ptrdiff_t,
// &::RTScheduling::Current::_narrow))
// retv = ACE_reinterpret_cast
// (
@@ -1047,7 +1047,7 @@ void *TAO_RTScheduler_Current::_tao_QueryInterface (ptr_arith_t type)
// this
// )
// );
-// else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow))
+// else if (type == ACE_reinterpret_cast (ptrdiff_t, &CORBA::Object::_narrow))
// retv = ACE_reinterpret_cast (void *,
// ACE_static_cast (CORBA::Object_ptr, this));
diff --git a/TAO/tao/RTScheduling/Current.h b/TAO/tao/RTScheduling/Current.h
index ccdc7f4b199..9c58e89f656 100644
--- a/TAO/tao/RTScheduling/Current.h
+++ b/TAO/tao/RTScheduling/Current.h
@@ -173,7 +173,7 @@ class TAO_RTScheduler_Export TAO_RTScheduler_Current
return (TAO_RTScheduler_Current_ptr)0;
}
- virtual void *_tao_QueryInterface (ptr_arith_t type);
+ virtual void *_tao_QueryInterface (ptrdiff_t type);
virtual const char* _interface_repository_id (void) const;
//@}
diff --git a/TAO/tests/RTScheduling/Current/Thread_Task.cpp b/TAO/tests/RTScheduling/Current/Thread_Task.cpp
index 86abc9da7fb..31d6a0ff4fc 100644
--- a/TAO/tests/RTScheduling/Current/Thread_Task.cpp
+++ b/TAO/tests/RTScheduling/Current/Thread_Task.cpp
@@ -21,7 +21,9 @@ Thread_Task::activate_task (CORBA::ORB_ptr orb,
this->orb_ = CORBA::ORB::_duplicate (orb);
- CORBA::Object_ptr current_obj = this->orb_->resolve_initial_references ("RTScheduler_Current");
+ CORBA::Object_ptr current_obj = this->orb_->resolve_initial_references ("RTScheduler_Current"
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
this->current_ = RTScheduling::Current::_narrow (current_obj
ACE_ENV_ARG_PARAMETER);
diff --git a/TAO/tests/RTScheduling/DT_Spawn/test.cpp b/TAO/tests/RTScheduling/DT_Spawn/test.cpp
index c0e70701560..840c26f642f 100644
--- a/TAO/tests/RTScheduling/DT_Spawn/test.cpp
+++ b/TAO/tests/RTScheduling/DT_Spawn/test.cpp
@@ -40,7 +40,9 @@ main (int argc, char* argv [])
manager->rtscheduler (scheduler);
- CORBA::Object_ptr current_obj = orb->resolve_initial_references ("RTScheduler_Current");
+ CORBA::Object_ptr current_obj = orb->resolve_initial_references ("RTScheduler_Current"
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
current = RTScheduling::Current::_narrow (current_obj
ACE_ENV_ARG_PARAMETER);
diff --git a/TAO/tests/RTScheduling/Scheduling_Interceptor/test_client.cpp b/TAO/tests/RTScheduling/Scheduling_Interceptor/test_client.cpp
index 3955a0dca3a..11ee4f31158 100644
--- a/TAO/tests/RTScheduling/Scheduling_Interceptor/test_client.cpp
+++ b/TAO/tests/RTScheduling/Scheduling_Interceptor/test_client.cpp
@@ -78,7 +78,9 @@ main (int argc, char* argv [])
1);
}
- CORBA::Object_ptr current_obj = orb->resolve_initial_references ("RTScheduler_Current");
+ CORBA::Object_ptr current_obj = orb->resolve_initial_references ("RTScheduler_Current"
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
RTScheduling::Current_var current = RTScheduling::Current::_narrow (current_obj
ACE_ENV_ARG_PARAMETER);
@@ -115,8 +117,6 @@ main (int argc, char* argv [])
"Caught exception:");
server->shutdown ();
- orb->shutdown ();
- orb->destroy ();
return 0;
}
ACE_ENDTRY;
diff --git a/TAO/tests/RTScheduling/Scheduling_Interceptor/test_server.cpp b/TAO/tests/RTScheduling/Scheduling_Interceptor/test_server.cpp
index 06e8d87bd6b..02a1f5aad2f 100644
--- a/TAO/tests/RTScheduling/Scheduling_Interceptor/test_server.cpp
+++ b/TAO/tests/RTScheduling/Scheduling_Interceptor/test_server.cpp
@@ -14,30 +14,30 @@ public:
test_impl (CORBA::ORB_ptr orb,
RTScheduling::Current_ptr current)
: orb_ (orb),
- current_ (RTScheduling::Current::_duplicate (current))
+ current_ (RTScheduling::Current::_duplicate (current))
{
}
virtual void one_way (const char * message
- ACE_ENV_ARG_DECL_NOT_USED)
+ ACE_ENV_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException))
{
ACE_DEBUG ((LM_DEBUG,
- "One-Way Message = %s\n",
- message));
+ "One-Way Message = %s\n",
+ message));
}
virtual char * two_way (const char * message
- ACE_ENV_ARG_DECL)
+ ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
ACE_DEBUG ((LM_DEBUG,
- "Two-Way Message = %s\n",
- message));
-
+ "Two-Way Message = %s\n",
+ message));
+
RTScheduling::DistributableThread_var DT =
this->current_->lookup (*(this->current_->id ())
- ACE_ENV_ARG_PARAMETER);
+ ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (0);
DT->cancel (ACE_ENV_SINGLE_ARG_PARAMETER);
@@ -50,7 +50,6 @@ public:
ACE_THROW_SPEC ((CORBA::SystemException))
{
orb_->shutdown ();
- orb_->destroy ();
}
private:
@@ -91,7 +90,7 @@ main (int argc, char* argv[])
argv,
""
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
+ ACE_TRY_CHECK;
parse_args (argc, argv);
@@ -112,7 +111,9 @@ main (int argc, char* argv[])
poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
- CORBA::Object_ptr current_obj = orb->resolve_initial_references ("RTScheduler_Current");
+ CORBA::Object_ptr current_obj = orb->resolve_initial_references ("RTScheduler_Current"
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
RTScheduling::Current_var current = RTScheduling::Current::_narrow (current_obj
ACE_ENV_ARG_PARAMETER);
@@ -129,17 +130,26 @@ main (int argc, char* argv[])
id = root_poa->activate_object (test_i
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
-
+
CORBA::Object_var server =
root_poa->id_to_reference (id.in ()
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
-
- CORBA::String_var ior =
- orb->object_to_string (server.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ CORBA::String_var ior;
+ if (!CORBA::is_nil (server.in ()))
+ {
+ ior = orb->object_to_string (server.in ()
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Failed to activate test object\n"),
+ -1);
+ }
+
ACE_DEBUG ((LM_DEBUG,
"IOR = %s\n",
ior.in ()));
@@ -180,3 +190,19 @@ main (int argc, char* argv[])
return 0;
}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/TAO/tests/RTScheduling/Thread_Cancel/Thread_Task.cpp b/TAO/tests/RTScheduling/Thread_Cancel/Thread_Task.cpp
index 02831af3368..1aab0c5c1b4 100644
--- a/TAO/tests/RTScheduling/Thread_Cancel/Thread_Task.cpp
+++ b/TAO/tests/RTScheduling/Thread_Cancel/Thread_Task.cpp
@@ -26,7 +26,9 @@ Thread_Task::activate_task (CORBA::ORB_ptr orb)
this->orb_ = CORBA::ORB::_duplicate (orb);
- CORBA::Object_ptr current_obj = this->orb_->resolve_initial_references ("RTScheduler_Current");
+ CORBA::Object_ptr current_obj = this->orb_->resolve_initial_references ("RTScheduler_Current"
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
this->current_ = RTScheduling::Current::_narrow (current_obj
ACE_ENV_ARG_PARAMETER);
diff --git a/TAO/tests/RTScheduling/Thread_Cancel/test.cpp b/TAO/tests/RTScheduling/Thread_Cancel/test.cpp
index 65f3bb282bb..cca30cda99a 100644
--- a/TAO/tests/RTScheduling/Thread_Cancel/test.cpp
+++ b/TAO/tests/RTScheduling/Thread_Cancel/test.cpp
@@ -42,7 +42,9 @@ main (int argc, char* argv [])
ACE_DEBUG ((LM_DEBUG,
"Cancelling Threads.....\n"));
- CORBA::Object_ptr current_obj = orb->resolve_initial_references ("RTScheduler_Current");
+ CORBA::Object_ptr current_obj = orb->resolve_initial_references ("RTScheduler_Current"
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
RTScheduling::Current_var current = RTScheduling::Current::_narrow (current_obj
ACE_ENV_ARG_PARAMETER);