@@ -3565,7 +3565,7 @@ ACE_OS::thr_create (ACE_THR_FUNC func,
35653565 void *stack,
35663566 size_t stacksize,
35673567 ACE_Base_Thread_Adapter *thread_adapter,
3568- const char ** thr_name)
3568+ const char ** thr_name)
35693569{
35703570 ACE_OS_TRACE (" ACE_OS::thr_create" );
35713571
@@ -4113,6 +4113,11 @@ ACE_OS::thr_create (ACE_THR_FUNC func,
41134113 flags,
41144114 thr_id);
41154115
4116+ if (thr_name && *thr_name && *thr_handle)
4117+ {
4118+ SetThreadDescription (*thr_handle, ACE_Ascii_To_Wide (*thr_name).wchar_rep ());
4119+ }
4120+
41164121 if (priority != ACE_DEFAULT_THREAD_PRIORITY && *thr_handle != 0 )
41174122 {
41184123 // Set the priority of the new thread and then let it
@@ -4168,7 +4173,7 @@ ACE_OS::thr_create (ACE_THR_FUNC func,
41684173 // The call below to ::taskSpawn () causes VxWorks to assign a
41694174 // unique task name of the form: "t" + an integer, because the
41704175 // first argument is 0.
4171- tid = ::taskSpawn (thr_name && *thr_name ? const_cast <char *> (*thr_name) : 0 ,
4176+ tid = ::taskSpawn (thr_name && *thr_name ? const_cast <char *> (*thr_name) : 0 ,
41724177 priority,
41734178 (int ) flags,
41744179 stacksize,
@@ -4188,7 +4193,7 @@ ACE_OS::thr_create (ACE_THR_FUNC func,
41884193
41894194 // The TID is defined to be the address of the TCB.
41904195 int status = ::taskInit (tcb,
4191- thr_name && *thr_name ? const_cast <char *> (*thr_name) : 0 ,
4196+ thr_name && *thr_name ? const_cast <char *> (*thr_name) : 0 ,
41924197 priority,
41934198 (int ) flags,
41944199 (char *) stack + sizeof (WIND_TCB),
0 commit comments