summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2005-03-21 14:00:02 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2005-03-21 14:00:02 +0000
commitb70cde7eae249e2a94dbe4c80792e86554c278c7 (patch)
tree7182208a73a3bb63b9d61d1c42fcb5c1a005f2dc
parentca69b4a4bcc4bea4c439cfab760e74a3759031e3 (diff)
downloadATCD-b70cde7eae249e2a94dbe4c80792e86554c278c7.tar.gz
ChangeLogTag: Mon Mar 21 07:58:47 2005 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r--TAO/ChangeLog23
-rw-r--r--TAO/examples/RTScheduling/DT_Creator.cpp20
-rw-r--r--TAO/examples/RTScheduling/DT_Creator.h3
-rw-r--r--TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_Scheduler.cpp10
-rw-r--r--TAO/examples/RTScheduling/Job_i.h2
-rw-r--r--TAO/examples/RTScheduling/MIF_Scheduler/MIF_Scheduler.cpp22
-rw-r--r--TAO/examples/RTScheduling/Thread_Task.h2
-rw-r--r--TAO/tao/RTScheduling/Current.cpp10
-rw-r--r--TAO/tao/RTScheduling/Request_Interceptor.cpp12
-rw-r--r--TAO/tests/RTScheduling/Current/Thread_Task.cpp2
-rw-r--r--TAO/tests/RTScheduling/DT_Spawn/Thread_Action.h2
-rw-r--r--TAO/tests/RTScheduling/DT_Spawn/test.cpp2
-rw-r--r--TAO/tests/RTScheduling/Scheduler.cpp10
-rw-r--r--TAO/tests/RTScheduling/Thread_Cancel/Thread_Task.cpp2
14 files changed, 83 insertions, 39 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 5793a07674e..a3329e758b7 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,26 @@
+Mon Mar 21 07:58:47 2005 Chad Elliott <elliott_c@ociweb.com>
+
+ * examples/RTScheduling/DT_Creator.h:
+ * examples/RTScheduling/DT_Creator.cpp:
+
+ Added a constructor for this class as it has many pointers that
+ need initialization.
+
+ * examples/RTScheduling/Fixed_Priority_Scheduler/FP_Scheduler.cpp:
+ * examples/RTScheduling/Job_i.h:
+ * examples/RTScheduling/MIF_Scheduler/MIF_Scheduler.cpp:
+ * examples/RTScheduling/Thread_Task.h:
+ * tao/RTScheduling/Current.cpp:
+ * tao/RTScheduling/Request_Interceptor.cpp:
+ * tests/RTScheduling/Current/Thread_Task.cpp:
+ * tests/RTScheduling/DT_Spawn/Thread_Action.h:
+ * tests/RTScheduling/DT_Spawn/test.cpp:
+ * tests/RTScheduling/Scheduler.cpp:
+ * tests/RTScheduling/Thread_Cancel/Thread_Task.cpp:
+
+ Use size_t instead of int when doing the memcpy. sizeof(int) !=
+ sizeof(long) on some 64-bit platforms.
+
Mon Mar 21 07:56:49 2005 Chad Elliott <elliott_c@ociweb.com>
* docs/Options.html:
diff --git a/TAO/examples/RTScheduling/DT_Creator.cpp b/TAO/examples/RTScheduling/DT_Creator.cpp
index 80ca1d8d767..4a7db7dd4ab 100644
--- a/TAO/examples/RTScheduling/DT_Creator.cpp
+++ b/TAO/examples/RTScheduling/DT_Creator.cpp
@@ -615,6 +615,26 @@ DT_Creator::dt_count (void)
return dt_count_;
}
+DT_Creator::DT_Creator (void)
+ : dt_list_ (0),
+ poa_list_ (0),
+ job_list_ (0),
+ dt_count_ (0),
+ poa_count_ (0),
+ job_count_ (0),
+ state_lock_ (0),
+ shutdown_lock_ (0),
+ active_dt_count_ (0),
+ active_job_count_ (0),
+ log (0),
+ base_time_ (0),
+ file_name_ (0),
+ log_file_name_ (0),
+ gsf_ (0),
+ synch_ (0)
+{
+}
+
DT_Creator::~DT_Creator (void)
{
// for (int i = 0; i < (BUFSIZ * 100); i++)
diff --git a/TAO/examples/RTScheduling/DT_Creator.h b/TAO/examples/RTScheduling/DT_Creator.h
index f5263b88645..b461ab298b2 100644
--- a/TAO/examples/RTScheduling/DT_Creator.h
+++ b/TAO/examples/RTScheduling/DT_Creator.h
@@ -22,8 +22,9 @@ typedef Job_i **JOB_LIST;
class DT_Creator : public ACE_Service_Object
{
public:
+ DT_Creator (void);
- ~DT_Creator (void);
+ virtual ~DT_Creator (void);
int init (int argc, char *argv []);
diff --git a/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_Scheduler.cpp b/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_Scheduler.cpp
index 2bf8311319e..e8e339faa13 100644
--- a/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_Scheduler.cpp
+++ b/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/FP_Scheduler.cpp
@@ -154,10 +154,10 @@ Fixed_Priority_Scheduler::send_request (PortableInterceptor::ClientRequestInfo_p
IOP::ServiceContext* srv_con = new IOP::ServiceContext;
srv_con->context_id = Client_Interceptor::SchedulingInfo;
- srv_con->context_data.length (sizeof (long));
+ srv_con->context_data.length (sizeof (size_t));
ACE_OS::memcpy (srv_con->context_data.get_buffer (),
current_->id (ACE_ENV_SINGLE_ARG_PARAMETER)->get_buffer (),
- sizeof (long));
+ sizeof (size_t));
ACE_CHECK;
request_info->add_request_service_context (*srv_con,
0
@@ -183,7 +183,7 @@ Fixed_Priority_Scheduler::receive_request (PortableInterceptor::ServerRequestInf
if (serv_cxt != 0)
{
- int gu_id;
+ size_t gu_id;
ACE_OS::memcpy (&gu_id,
serv_cxt->context_data.get_buffer (),
serv_cxt->context_data.length ());
@@ -198,11 +198,11 @@ Fixed_Priority_Scheduler::receive_request (PortableInterceptor::ServerRequestInf
// Generate GUID.
- guid->length (sizeof(long));
+ guid->length (sizeof(size_t));
ACE_OS::memcpy (guid->get_buffer (),
&gu_id,
- sizeof(long));
+ sizeof(size_t));
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG,
diff --git a/TAO/examples/RTScheduling/Job_i.h b/TAO/examples/RTScheduling/Job_i.h
index d319a5a80b7..3210a095b31 100644
--- a/TAO/examples/RTScheduling/Job_i.h
+++ b/TAO/examples/RTScheduling/Job_i.h
@@ -72,7 +72,7 @@ class Job_i : public POA_Job, public virtual PortableServer::RefCountServantBase
Task_Stats *task_stats_;
- int guid_;
+ size_t guid_;
};
#endif /* JOB_I_H */
diff --git a/TAO/examples/RTScheduling/MIF_Scheduler/MIF_Scheduler.cpp b/TAO/examples/RTScheduling/MIF_Scheduler/MIF_Scheduler.cpp
index 08cccbfbab9..8c3dabfc011 100644
--- a/TAO/examples/RTScheduling/MIF_Scheduler/MIF_Scheduler.cpp
+++ b/TAO/examples/RTScheduling/MIF_Scheduler/MIF_Scheduler.cpp
@@ -132,7 +132,7 @@ MIF_Scheduler::begin_new_scheduling_segment (const RTScheduling::Current::IdType
ACE_THROW_SPEC ((CORBA::SystemException,
RTScheduling::Current::UNSUPPORTED_SCHEDULING_DISCIPLINE))
{
- int count;
+ size_t count = 0;
ACE_OS::memcpy (&count,
this->current_->id ()->get_buffer (),
this->current_->id ()->length ());
@@ -193,7 +193,7 @@ MIF_Scheduler::update_scheduling_segment (const RTScheduling::Current::IdType &/
ACE_THROW_SPEC ((CORBA::SystemException,
RTScheduling::Current::UNSUPPORTED_SCHEDULING_DISCIPLINE))
{
- int count;
+ size_t count = 0;
ACE_OS::memcpy (&count,
this->current_->id ()->get_buffer (),
this->current_->id ()->length ());
@@ -244,7 +244,7 @@ MIF_Scheduler::end_scheduling_segment (const RTScheduling::Current::IdType &guid
ACE_ENV_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- int count;
+ size_t count = 0;
ACE_OS::memcpy (&count,
guid.get_buffer (),
guid.length ());
@@ -387,12 +387,12 @@ MIF_Scheduler::receive_request (PortableInterceptor::ServerRequestInfo_ptr reque
ACE_NEW (guid,
RTScheduling::Current::IdType);
- guid->length (sizeof(long));
+ guid->length (sizeof(size_t));
ACE_OS::memcpy (guid->get_buffer (),
serv_cxt->context_data.get_buffer (),
- sizeof (long));
+ sizeof (size_t));
- int gu_id;
+ size_t gu_id;
ACE_OS::memcpy (&gu_id,
guid->get_buffer (),
guid->length ());
@@ -445,7 +445,7 @@ MIF_Scheduler::send_reply (PortableInterceptor::ServerRequestInfo_ptr
RTScheduling::Current::IdType* guid = current_->id (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK;
- int count;
+ size_t count;
ACE_OS::memcpy (&count,
guid->get_buffer (),
guid->length ());
@@ -495,7 +495,7 @@ MIF_Scheduler::send_other (PortableInterceptor::ServerRequestInfo_ptr
RTScheduling::Current::IdType* guid = current_->id (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK;
- int count;
+ size_t count;
ACE_OS::memcpy (&count,
guid->get_buffer (),
guid->length ());
@@ -544,7 +544,7 @@ MIF_Scheduler::receive_reply (PortableInterceptor::ClientRequestInfo_ptr
RTScheduling::Current::IdType* guid = current_->id (ACE_ENV_SINGLE_ARG_PARAMETER);
- int gu_id;
+ size_t gu_id;
ACE_OS::memcpy (&gu_id,
guid->get_buffer (),
guid->length ());
@@ -596,7 +596,7 @@ MIF_Scheduler::receive_exception (PortableInterceptor::ClientRequestInfo_ptr
RTScheduling::Current::IdType* guid = current_->id (ACE_ENV_SINGLE_ARG_PARAMETER);
- int gu_id;
+ size_t gu_id;
ACE_OS::memcpy (&gu_id,
guid->get_buffer (),
guid->length ());
@@ -642,7 +642,7 @@ MIF_Scheduler::receive_other (PortableInterceptor::ClientRequestInfo_ptr
RTScheduling::Current::IdType* guid = current_->id (ACE_ENV_SINGLE_ARG_PARAMETER);
- int gu_id;
+ size_t gu_id;
ACE_OS::memcpy (&gu_id,
guid->get_buffer (),
guid->length ());
diff --git a/TAO/examples/RTScheduling/Thread_Task.h b/TAO/examples/RTScheduling/Thread_Task.h
index 3b79b814909..2ee0486a4e3 100644
--- a/TAO/examples/RTScheduling/Thread_Task.h
+++ b/TAO/examples/RTScheduling/Thread_Task.h
@@ -52,7 +52,7 @@ class Thread_Task : public ACE_Task <ACE_SYNCH>
int start_time_;
int load_;
int iter_;
- int count_;
+ size_t count_;
int importance_;
DT_Creator *dt_creator_;
//Task *task_;
diff --git a/TAO/tao/RTScheduling/Current.cpp b/TAO/tao/RTScheduling/Current.cpp
index 830a49a42d6..4549fbe90f8 100644
--- a/TAO/tao/RTScheduling/Current.cpp
+++ b/TAO/tao/RTScheduling/Current.cpp
@@ -351,13 +351,13 @@ TAO_RTScheduler_Current_i::begin_scheduling_segment(
if (this->guid_.length () == 0)
{
//Generate GUID
- long temp = ++TAO_RTScheduler_Current::guid_counter;
- this->guid_.length (sizeof(long));
+ size_t temp = ++TAO_RTScheduler_Current::guid_counter;
+ this->guid_.length (sizeof(size_t));
ACE_OS::memcpy (this->guid_.get_buffer (),
&temp,
- sizeof(long));
+ sizeof(size_t));
- int guid;
+ size_t guid;
ACE_OS::memcpy (&guid,
this->guid_.get_buffer (),
this->guid_.length ());
@@ -734,7 +734,7 @@ void
TAO_RTScheduler_Current_i::cancel_thread (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- int guid;
+ size_t guid;
ACE_OS::memcpy (&guid,
this->guid_.get_buffer (),
this->guid_.length ());
diff --git a/TAO/tao/RTScheduling/Request_Interceptor.cpp b/TAO/tao/RTScheduling/Request_Interceptor.cpp
index 0050f5ce576..0caa243e2be 100644
--- a/TAO/tao/RTScheduling/Request_Interceptor.cpp
+++ b/TAO/tao/RTScheduling/Request_Interceptor.cpp
@@ -50,12 +50,12 @@ Client_Interceptor::send_request (PortableInterceptor::ClientRequestInfo_ptr ri
RTScheduling::Current::IdType guid;
guid.length (sizeof(long));
- long temp = ++TAO_RTScheduler_Current::guid_counter;
+ size_t temp = ++TAO_RTScheduler_Current::guid_counter;
ACE_OS::memcpy (guid.get_buffer (),
&temp,
- sizeof(long));
+ sizeof(size_t));
- int id;
+ size_t id;
ACE_OS::memcpy (&id,
guid.get_buffer (),
guid.length ());
@@ -338,12 +338,12 @@ Server_Interceptor::receive_request (PortableInterceptor::ServerRequestInfo_ptr
return;
}
RTScheduling::Current::IdType guid;
- guid.length (sizeof (long));
+ guid.length (sizeof (size_t));
ACE_OS::memcpy (guid.get_buffer (),
guid_var->get_buffer (),
- sizeof (long));
+ sizeof (size_t));
- int id;
+ size_t id;
ACE_OS::memcpy (&id,
guid.get_buffer (),
guid.length ());
diff --git a/TAO/tests/RTScheduling/Current/Thread_Task.cpp b/TAO/tests/RTScheduling/Current/Thread_Task.cpp
index 87f33c30c1d..63fa625ff09 100644
--- a/TAO/tests/RTScheduling/Current/Thread_Task.cpp
+++ b/TAO/tests/RTScheduling/Current/Thread_Task.cpp
@@ -111,7 +111,7 @@ Thread_Task::svc (void)
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- int count ;
+ size_t count = 0;
ACE_OS::memcpy (&count,
this->current_->id ()->get_buffer (),
this->current_->id ()->length ());
diff --git a/TAO/tests/RTScheduling/DT_Spawn/Thread_Action.h b/TAO/tests/RTScheduling/DT_Spawn/Thread_Action.h
index 04e10e1146f..137bcc7126a 100644
--- a/TAO/tests/RTScheduling/DT_Spawn/Thread_Action.h
+++ b/TAO/tests/RTScheduling/DT_Spawn/Thread_Action.h
@@ -42,7 +42,7 @@ Test_Thread_Action::_cxx_do (CORBA::VoidData data
"Test_Thread_Action::do %s\n",
tmp->data));
- int count ;
+ size_t count = 0;
ACE_OS::memcpy (&count,
tmp->current->id ()->get_buffer (),
tmp->current->id ()->length ());
diff --git a/TAO/tests/RTScheduling/DT_Spawn/test.cpp b/TAO/tests/RTScheduling/DT_Spawn/test.cpp
index 5c28403df92..a61868825ec 100644
--- a/TAO/tests/RTScheduling/DT_Spawn/test.cpp
+++ b/TAO/tests/RTScheduling/DT_Spawn/test.cpp
@@ -87,7 +87,7 @@ main (int argc, char* argv [])
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- int count ;
+ size_t count = 0;
ACE_OS::memcpy (&count,
current->id ()->get_buffer (),
current->id ()->length ());
diff --git a/TAO/tests/RTScheduling/Scheduler.cpp b/TAO/tests/RTScheduling/Scheduler.cpp
index e0917ebbc94..6b015f4183f 100644
--- a/TAO/tests/RTScheduling/Scheduler.cpp
+++ b/TAO/tests/RTScheduling/Scheduler.cpp
@@ -126,10 +126,10 @@ TAO_Scheduler::send_request (PortableInterceptor::ClientRequestInfo_ptr request_
{
IOP::ServiceContext* srv_con = new IOP::ServiceContext;
srv_con->context_id = Client_Interceptor::SchedulingInfo;
- srv_con->context_data.length (sizeof (long));
+ srv_con->context_data.length (sizeof (size_t));
ACE_OS::memcpy (srv_con->context_data.get_buffer (),
current_->id (ACE_ENV_SINGLE_ARG_PARAMETER)->get_buffer (),
- sizeof (long));
+ sizeof (size_t));
ACE_CHECK;
request_info->add_request_service_context (*srv_con,
0);
@@ -162,7 +162,7 @@ TAO_Scheduler::receive_request (PortableInterceptor::ServerRequestInfo_ptr reque
if (serv_cxt != 0)
{
- int gu_id;
+ size_t gu_id;
ACE_OS::memcpy (&gu_id,
serv_cxt->context_data.get_buffer (),
serv_cxt->context_data.length ());
@@ -175,10 +175,10 @@ TAO_Scheduler::receive_request (PortableInterceptor::ServerRequestInfo_ptr reque
ACE_NEW (guid,
RTScheduling::Current::IdType);
- guid->length (sizeof (long));
+ guid->length (sizeof (size_t));
ACE_OS::memcpy (guid->get_buffer (),
serv_cxt->context_data.get_buffer (),
- sizeof (long));
+ sizeof (size_t));
guid_out.ptr () = guid;
}
diff --git a/TAO/tests/RTScheduling/Thread_Cancel/Thread_Task.cpp b/TAO/tests/RTScheduling/Thread_Cancel/Thread_Task.cpp
index 4cdf2f37848..97b36cd3e73 100644
--- a/TAO/tests/RTScheduling/Thread_Cancel/Thread_Task.cpp
+++ b/TAO/tests/RTScheduling/Thread_Cancel/Thread_Task.cpp
@@ -78,7 +78,7 @@ Thread_Task::svc (void)
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- int count ;
+ size_t count = 0;
ACE_OS::memcpy (&count,
current_->id ()->get_buffer (),
current_->id ()->length ());