summaryrefslogtreecommitdiff
path: root/TAO/tao/CSD_ThreadPool
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2008-01-16 19:23:21 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2008-01-16 19:23:21 +0000
commit6823ba17a8af7c351135b5f60a84b45acafd2a3d (patch)
tree7300754eb2762a6394946b7bb744497dca5dc7ab /TAO/tao/CSD_ThreadPool
parent6b80322b117e40e332777777f8e9a8bb6f776124 (diff)
downloadATCD-6823ba17a8af7c351135b5f60a84b45acafd2a3d.tar.gz
Wed Jan 16 19:22:12 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO/tao/CSD_ThreadPool')
-rw-r--r--TAO/tao/CSD_ThreadPool/CSD_TP_Strategy.h25
-rw-r--r--TAO/tao/CSD_ThreadPool/CSD_TP_Task.cpp22
-rw-r--r--TAO/tao/CSD_ThreadPool/CSD_TP_Task.h4
3 files changed, 20 insertions, 31 deletions
diff --git a/TAO/tao/CSD_ThreadPool/CSD_TP_Strategy.h b/TAO/tao/CSD_ThreadPool/CSD_TP_Strategy.h
index 0b927f9d0cd..108a15f88f2 100644
--- a/TAO/tao/CSD_ThreadPool/CSD_TP_Strategy.h
+++ b/TAO/tao/CSD_ThreadPool/CSD_TP_Strategy.h
@@ -90,21 +90,18 @@ namespace TAO
/// (dispatched or cancelled) or rejected.
/// Will return REQUEST_EXECUTED, REQUEST_CANCELLED, or REQUEST_REJECTED.
CustomRequestOutcome custom_synch_request
- (TP_Custom_Request_Operation* op
- );
+ (TP_Custom_Request_Operation* op);
/// Inject an asynchronous, custom request into the request queue.
/// This will return control to the calling thread once the request
/// has been placed into the queue (or rejected).
/// Will return REQUEST_DISPATCHED or REQUEST_REJECTED.
CustomRequestOutcome custom_asynch_request
- (TP_Custom_Request_Operation* op
- );
+ (TP_Custom_Request_Operation* op);
/// Cancel all requests that are targeted for the provided servant.
/// This is requested on the user application level.
- void cancel_requests(PortableServer::Servant servant
- );
+ void cancel_requests(PortableServer::Servant servant);
protected:
@@ -118,8 +115,7 @@ namespace TAO
const PortableServer::ObjectId& object_id,
PortableServer::POA_ptr poa,
const char* operation,
- PortableServer::Servant servant
- );
+ PortableServer::Servant servant);
/// Handle the dispatching of a collocated request.
///
@@ -131,8 +127,7 @@ namespace TAO
const PortableServer::ObjectId& object_id,
PortableServer::POA_ptr poa,
const char* operation,
- PortableServer::Servant servant
- );
+ PortableServer::Servant servant);
/// Event - The POA has been activated.
/// This will activate the worker thread(s).
@@ -147,15 +142,12 @@ namespace TAO
/// Event - A servant has been activated
virtual void servant_activated_event_i
(PortableServer::Servant servant,
- const PortableServer::ObjectId& oid
- );
+ const PortableServer::ObjectId& oid);
/// Event - A servant has been deactivated
virtual void servant_deactivated_event_i
(PortableServer::Servant servant,
- const PortableServer::ObjectId& oid
- );
-
+ const PortableServer::ObjectId& oid);
private:
@@ -174,8 +166,7 @@ namespace TAO
* state cannot be determined.
*/
TP_Servant_State::HandleType get_servant_state
- (PortableServer::Servant servant
- );
+ (PortableServer::Servant servant);
/// This is the active object used by the worker threads.
diff --git a/TAO/tao/CSD_ThreadPool/CSD_TP_Task.cpp b/TAO/tao/CSD_ThreadPool/CSD_TP_Task.cpp
index eccb707d0a7..7ecbac2c473 100644
--- a/TAO/tao/CSD_ThreadPool/CSD_TP_Task.cpp
+++ b/TAO/tao/CSD_ThreadPool/CSD_TP_Task.cpp
@@ -61,8 +61,8 @@ TAO::CSD::TP_Task::open(void* num_threads_ptr)
{
//FUZZ: disable check_for_lack_ACE_OS
ACE_ERROR_RETURN((LM_ERROR,
- "(%P|%t) TP_Task failed to open. "
- "Invalid argument type passed to open().\n"),
+ ACE_TEXT ("(%P|%t) TP_Task failed to open. ")
+ ACE_TEXT ("Invalid argument type passed to open().\n")),
-1);
//FUZZ: enable check_for_lack_ACE_OS
}
@@ -74,8 +74,8 @@ TAO::CSD::TP_Task::open(void* num_threads_ptr)
if (num < 1)
{
ACE_ERROR_RETURN((LM_ERROR,
- "(%P|%t) TP_Task failed to open. "
- "num_threads (%u) is less-than 1.\n",
+ ACE_TEXT ("(%P|%t) TP_Task failed to open. ")
+ ACE_TEXT ("num_threads (%u) is less-than 1.\n"),
num),
-1);
}
@@ -84,8 +84,8 @@ TAO::CSD::TP_Task::open(void* num_threads_ptr)
if (num > MAX_THREADPOOL_TASK_WORKER_THREADS)
{
ACE_ERROR_RETURN((LM_ERROR,
- "(%P|%t) TP_Task failed to open. "
- "num_threads (%u) is too large. Max is %d.\n",
+ ACE_TEXT ("(%P|%t) TP_Task failed to open. ")
+ ACE_TEXT ("num_threads (%u) is too large. Max is %d.\n"),
num, MAX_THREADPOOL_TASK_WORKER_THREADS),
-1);
}
@@ -99,8 +99,8 @@ TAO::CSD::TP_Task::open(void* num_threads_ptr)
{
//FUZZ: disable check_for_lack_ACE_OS
ACE_ERROR_RETURN((LM_ERROR,
- "(%P|%t) TP_Task failed to open. "
- "Task has previously been open()'ed.\n"),
+ ACE_TEXT ("(%P|%t) TP_Task failed to open. ")
+ ACE_TEXT ("Task has previously been open()'ed.\n")),
-1);
//FUZZ: enable check_for_lack_ACE_OS
}
@@ -111,8 +111,8 @@ TAO::CSD::TP_Task::open(void* num_threads_ptr)
// Assumes that when activate returns non-zero return code that
// no threads were activated.
ACE_ERROR_RETURN((LM_ERROR,
- "(%P|%t) TP_Task failed to activate "
- "(%d) worker threads.\n",
+ ACE_TEXT ("(%P|%t) TP_Task failed to activate ")
+ ACE_TEXT ("(%d) worker threads.\n"),
num),
-1);
}
@@ -272,7 +272,7 @@ TAO::CSD::TP_Task::close(u_long flag)
// Check whether the calling thread(calling orb shutdown) is one of the
// threads in the pool. If it is then it should not wait itself.
- size_t size = this->activated_threads_.size ();
+ size_t const size = this->activated_threads_.size ();
for (size_t i = 0; i < size; i ++)
{
diff --git a/TAO/tao/CSD_ThreadPool/CSD_TP_Task.h b/TAO/tao/CSD_ThreadPool/CSD_TP_Task.h
index c3fec3a6479..445ecf968b3 100644
--- a/TAO/tao/CSD_ThreadPool/CSD_TP_Task.h
+++ b/TAO/tao/CSD_ThreadPool/CSD_TP_Task.h
@@ -102,9 +102,7 @@ namespace TAO
virtual int close(u_long flag = 0);
/// Cancel all requests that are targeted for the provided servant.
- void cancel_servant (PortableServer::Servant servant
- );
-
+ void cancel_servant (PortableServer::Servant servant);
private: