[Ace-users] [ace-users] Task name in VxWorks
Douglas C. Schmidt
schmidt at dre.vanderbilt.edu
Mon Oct 8 08:24:08 CDT 2007
Thank for using the PRF.
> ACE VERSION: 5.5
Please upgrade to ACE+TAO+CIAO x.6.1 (i.e., ACE 5.6.1, TAO 1.6.1, and
CIAO 0.6.1), which you can download from
under the heading: "Latest Beta Kit."
The DOC groups at Washington University, UC Irvine, and Vanderbilt
University only provide "best effort" support for non-sponsors for the
latest release, as described in
Thus, if you need more "predictable" help for earlier versions of
ACE+TAO, I recommend that you check out
for a list of companies that will provide you with ACE+TAO commercial
> HOST MACHINE and OPERATING SYSTEM:
> WindowsXP , SP2
> TARGET MACHINE and OPERATING SYSTEM,
> PPC , VxWorks 5.5/ Tornado 2.2.1
> COMPILER NAME AND VERSION (AND PATCHLEVEL): gcc 2.96
> CONTENTS OF $ACE_ROOT/ace/config.h
> CONTENTS OF $ACE_ROOT/include/makeinclude/platform_macros.GNU
> this isn't used in this case, e.g., with Microsoft Visual C++):
> AREA/CLASS/EXAMPLE AFFECTED:
> DOES THE PROBLEM AFFECT:
> OTHER (please specify)?
> Task name in VxWorks
> [Brief description of the problem]
> How I can define task ( thread ) name during creation in
> I succeded to give task name using ACE_thread_t argument in
> spawn function.
> But my code runs on VxWorks and Windows XP and I didn't find
> platform way ( without using #ifdef VXWORKS ) to solve this
> SAMPLE FIX/WORKAROUND:
> std::string thread_name("My Thread") ;
> char* p_thread_name = (char*)thread_name.c_str() ;
> ACE_Thread_Manager::instance()->spawn (
> ACE_THR_FUNC( server) ,
> reinterpret_cast<void*>(thread_arg) ,
> THR_NEW_LWP | THR_DEAMON
> #ifdef VXWORKS
> | VX_FP_TASK , &p_thread_name
> ) ;
> In this way thread_name and p_thread_name is unused variables in
> Windows XP.
> May be somebody can advise portable solution?
I don't see an easy way to make this 100% portable since the operating
systems simply have different types for thread id. If you see a way to
do this please let us know.
More information about the Ace-users