summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvenkita <venkita@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-03-22 17:46:39 +0000
committervenkita <venkita@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-03-22 17:46:39 +0000
commitd6dfbfb075c17af39a7aa9b1fafbcca3ddfe7478 (patch)
tree908d2c80dfa7ac7c06f02793d58ac7adb0f16e42
parent38b1f6b03726fbd00e5341a11b89dc9cf7addb19 (diff)
downloadATCD-d6dfbfb075c17af39a7aa9b1fafbcca3ddfe7478.tar.gz
*** empty log message ***
-rw-r--r--Kokyu/Default_Dispatcher_Impl.cpp12
-rw-r--r--Kokyu/Dispatcher_Task.cpp13
-rw-r--r--Kokyu/Kokyu.h1
-rw-r--r--Kokyu/Kokyu.i4
4 files changed, 16 insertions, 14 deletions
diff --git a/Kokyu/Default_Dispatcher_Impl.cpp b/Kokyu/Default_Dispatcher_Impl.cpp
index b24fc62fa33..228ac17872f 100644
--- a/Kokyu/Default_Dispatcher_Impl.cpp
+++ b/Kokyu/Default_Dispatcher_Impl.cpp
@@ -25,11 +25,11 @@ Default_Dispatcher_Impl::init_i (const ConfigInfoSet& config_info_set)
this->ntasks_ = size;
- Dispatcher_Task_Auto_Ptr * tmp=0;
- ACE_NEW_RETURN (tmp, Dispatcher_Task_Auto_Ptr[ntasks_], -1);
+ Dispatcher_Task_Auto_Ptr * tasks_array=0;
+ ACE_NEW_RETURN (tasks_array, Dispatcher_Task_Auto_Ptr[ntasks_], -1);
ACE_DEBUG ((LM_DEBUG, "after new on task array\n" ));
- tasks_.reset(tmp);
+ tasks_.reset(tasks_array);
ACE_DEBUG ((LM_DEBUG, "task array auto_ptr set\n" ));
@@ -41,9 +41,9 @@ Default_Dispatcher_Impl::init_i (const ConfigInfoSet& config_info_set)
for (;i<size && iter.next (config);iter.advance ())
{
ACE_DEBUG ((LM_DEBUG, "iter = %d\n", i));
- Dispatcher_Task* tmp2=0;
- ACE_NEW_RETURN (tmp2, Dispatcher_Task (*config), -1);
- tasks_[i++].reset (tmp2);
+ Dispatcher_Task* task=0;
+ ACE_NEW_RETURN (task, Dispatcher_Task (*config), -1);
+ tasks_[i++].reset (task);
}
this->activate ();
diff --git a/Kokyu/Dispatcher_Task.cpp b/Kokyu/Dispatcher_Task.cpp
index 0c82e768d5c..87e58535211 100644
--- a/Kokyu/Dispatcher_Task.cpp
+++ b/Kokyu/Dispatcher_Task.cpp
@@ -18,16 +18,16 @@ Dispatcher_Task::init ()
{
case FIFO_DISPATCHING:
ACE_NEW_RETURN (
- this->the_queue_,
- ACE_Message_Queue<ACE_SYNCH>,
- -1);
+ this->the_queue_,
+ ACE_Message_Queue<ACE_SYNCH>,
+ -1);
break;
case DEADLINE_DISPATCHING:
ACE_NEW_RETURN (
- this->the_queue_,
- ACE_Dynamic_Message_Queue<ACE_SYNCH> (deadline_msg_strategy_),
- -1);
+ this->the_queue_,
+ ACE_Dynamic_Message_Queue<ACE_SYNCH> (deadline_msg_strategy_),
+ -1);
break;
case LAXITY_DISPATCHING:
@@ -78,7 +78,6 @@ Dispatcher_Task::svc (void)
int result = command->execute ();
if (command->can_be_deleted ())
- //@@what if it was allocated thru an allocator?
command->destroy ();
ACE_Message_Block::release (mb);
diff --git a/Kokyu/Kokyu.h b/Kokyu/Kokyu.h
index 69e59294b5b..4d18b0d9399 100644
--- a/Kokyu/Kokyu.h
+++ b/Kokyu/Kokyu.h
@@ -121,6 +121,7 @@ namespace Kokyu
class Kokyu_Export Dispatcher_Factory
{
public:
+ //@@ Should we return auto_ptr<Dispatcher> instead?
static Dispatcher* create_dispatcher (const ConfigInfoSet&);
};
} //end of namespace
diff --git a/Kokyu/Kokyu.i b/Kokyu/Kokyu.i
index 415d19a1534..583e64c237f 100644
--- a/Kokyu/Kokyu.i
+++ b/Kokyu/Kokyu.i
@@ -19,7 +19,9 @@ int Dispatch_Command::can_be_deleted (void) const
ACE_INLINE
void Dispatch_Command::destroy (void)
{
- delete this;
+ //@@what if it was allocated thru an allocator?
+ //may be this should be left as a pure virtual
+ delete this;
}
ACE_INLINE