summaryrefslogtreecommitdiff
path: root/ace/Task.cpp
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-02-19 21:52:00 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-02-19 21:52:00 +0000
commit780bf8429c66c44545e052a0d71254dfefef1fc5 (patch)
tree56a80d96c8570b4582e95ef58f2391672e2bf508 /ace/Task.cpp
parentee46b6f4c1fb2237173b94e59b9d9020df1c1d35 (diff)
downloadATCD-780bf8429c66c44545e052a0d71254dfefef1fc5.tar.gz
(activate): added optional thread_names array argument
Diffstat (limited to 'ace/Task.cpp')
-rw-r--r--ace/Task.cpp42
1 files changed, 31 insertions, 11 deletions
diff --git a/ace/Task.cpp b/ace/Task.cpp
index 4bf8cc8690e..e7ea90312f7 100644
--- a/ace/Task.cpp
+++ b/ace/Task.cpp
@@ -67,7 +67,8 @@ ACE_Task_Base::activate (long flags,
ACE_Task_Base *task,
ACE_hthread_t thread_handles[],
void *stack[],
- size_t stack_size[])
+ size_t stack_size[],
+ ACE_thread_t thread_names[])
{
ACE_TRACE ("ACE_Task_Base::activate");
@@ -89,16 +90,34 @@ ACE_Task_Base::activate (long flags,
if (this->thr_mgr_ == 0)
this->thr_mgr_ = ACE_Thread_Manager::instance ();
- this->grp_id_ = this->thr_mgr_->spawn_n (n_threads,
- ACE_THR_FUNC (&ACE_Task_Base::svc_run),
- (void *) this,
- flags,
- priority,
- grp_id,
- task,
- thread_handles,
- stack,
- stack_size);
+ if (thread_names == 0)
+ // thread names were not specified
+ this->grp_id_ = this->thr_mgr_->spawn_n (
+ n_threads,
+ ACE_THR_FUNC (&ACE_Task_Base::svc_run),
+ (void *) this,
+ flags,
+ priority,
+ grp_id,
+ task,
+ thread_handles,
+ stack,
+ stack_size);
+ else
+ // thread names were specified
+ this->grp_id_ = this->thr_mgr_->spawn_n (
+ thread_names,
+ n_threads,
+ ACE_THR_FUNC (&ACE_Task_Base::svc_run),
+ (void *) this,
+ flags,
+ priority,
+ grp_id,
+ stack,
+ stack_size,
+ thread_handles);
+
+
if (this->grp_id_ == -1)
return -1;
else
@@ -115,6 +134,7 @@ ACE_Task_Base::activate (long flags,
ACE_UNUSED_ARG (thread_handles);
ACE_UNUSED_ARG (stack);
ACE_UNUSED_ARG (stack_size);
+ ACE_UNUSED_ARG (thread_names);
errno = EINVAL;
return -1;
}